Sathish
Member level 4
- Joined
- Jan 6, 2006
- Messages
- 69
- Helped
- 5
- Reputation
- 10
- Reaction score
- 3
- Trophy points
- 1,288
- Location
- Chennai
- Activity points
- 1,909
Help for a small problem
Here is a small module. This is just a module of a memory device. I tried to force the values, i can write the value from 'Data' in to the 'Address' but i could not read from the 'Address' back to the 'Data'.
module RamChip (Address, Data, CS, WE, OE);
parameter AddressSize = 1;
parameter WordSize = 1;
input [AddressSize-1:0] Address;
inout [WordSize-1:0] Data;
input CS, WE, OE;
reg [WordSize-1:0] Mem [0:1<<AddressSize];
assign Data = (!CS && !OE) ? Mem[Address] : 1'bz;
always @(CS or WE)
if (!CS && !WE)
Mem[Address] = Data;
always @(WE or OE)
if (!WE && !OE)
$display("Operational error in RamChip: OE and WE both active");
endmodule
Plz suggest me. thankx...............
Here is a small module. This is just a module of a memory device. I tried to force the values, i can write the value from 'Data' in to the 'Address' but i could not read from the 'Address' back to the 'Data'.
module RamChip (Address, Data, CS, WE, OE);
parameter AddressSize = 1;
parameter WordSize = 1;
input [AddressSize-1:0] Address;
inout [WordSize-1:0] Data;
input CS, WE, OE;
reg [WordSize-1:0] Mem [0:1<<AddressSize];
assign Data = (!CS && !OE) ? Mem[Address] : 1'bz;
always @(CS or WE)
if (!CS && !WE)
Mem[Address] = Data;
always @(WE or OE)
if (!WE && !OE)
$display("Operational error in RamChip: OE and WE both active");
endmodule
Plz suggest me. thankx...............