4 output wire [31:0] bus_rdata,
5 input [31:0] bus_wdata,
10 output wire cr_nADV, cr_nCE, cr_nOE, cr_nWE, cr_CRE, cr_nLB, cr_nUB, cr_CLK,
11 inout wire [15:0] cr_DQ,
12 output wire [22:0] cr_A,
16 /* This module is mapped in physical memory from 0x80000000 to
17 * 0x80FFFFFF. rdata and ready must be driven to zero if the
18 * address is not within the range of this module.
20 wire decode = bus_addr[31:24] == 8'h80;
21 assign cr_A = bus_addr[23:1];
22 reg [22:0] cr_A_1a = 23'h7FFFFF;
23 reg [22:0] cr_A_2a = 23'h7FFFFF;
24 wire active = (decode && (bus_rd || bus_wr));
33 active_2a <= active_1a;
36 assign bus_rdata = (bus_rd && decode) ? {16'h0000, cr_DQ} : 32'h0;
37 assign cr_DQ = (bus_wr && decode) ? bus_wdata : 16'hzzzz;
39 assign bus_ready = active && active_1a && active_2a && (cr_A_1a == cr_A) && (cr_A_2a == cr_A);
42 assign cr_nADV = ~decode;
44 assign cr_nOE = ~bus_rd;
45 assign cr_nWE = ~bus_wr;