C
Chris
Guest
The Icarus Verilog compiler keeps reporting an error on a RAM module
declaration.
Here is the module:
// Memory Module
// ==================================================================
module MEM16X32(data,address,wr,rd);
parameter delay = 10;
inout [31:0] data;
input [ 3:0] address;
input wr,rd;
reg [31:0] memoryspace [15:0];
wire [31:0] localdataout;
wire outputenable;
// The value at the current address is
// always at the input of the buffer
assign localdataout = memoryspace[address];
// A rising edge of the write pulse
// actually puts the data into memory
always @(negedge wr)
#delay memoryspace[address] <= data;
// Write must be low to prevent
// conflicts during a read!
and #delay u1(outputenable,rd,~wr);
// If a read occurs then just
// enable the output wires onto the bus.
tribuf 32 #delay outbuf(data, localdataout, outputenable); // <<<
Parse Error Here
endmodule
module tribuf (q,d,oe); // if OE=1 then Q=D, else Q=Z
output q;
input d,oe;
bufif1 tsb (q,d,oe);
endmodule
It reports invalid Module Instantiation on the line:
tribuf 32 #delay outbuf(data, localdataout, outputenable); // <<<
Parse Error Here
I can't figure out what is wrong here. Looks fine to me. Anyone have an
idea?
Chris.
declaration.
Here is the module:
// Memory Module
// ==================================================================
module MEM16X32(data,address,wr,rd);
parameter delay = 10;
inout [31:0] data;
input [ 3:0] address;
input wr,rd;
reg [31:0] memoryspace [15:0];
wire [31:0] localdataout;
wire outputenable;
// The value at the current address is
// always at the input of the buffer
assign localdataout = memoryspace[address];
// A rising edge of the write pulse
// actually puts the data into memory
always @(negedge wr)
#delay memoryspace[address] <= data;
// Write must be low to prevent
// conflicts during a read!
and #delay u1(outputenable,rd,~wr);
// If a read occurs then just
// enable the output wires onto the bus.
tribuf 32 #delay outbuf(data, localdataout, outputenable); // <<<
Parse Error Here
endmodule
module tribuf (q,d,oe); // if OE=1 then Q=D, else Q=Z
output q;
input d,oe;
bufif1 tsb (q,d,oe);
endmodule
It reports invalid Module Instantiation on the line:
tribuf 32 #delay outbuf(data, localdataout, outputenable); // <<<
Parse Error Here
I can't figure out what is wrong here. Looks fine to me. Anyone have an
idea?
Chris.