Thanks for reply.
I'm using this RAM model for a 128x8-bit :
module ram128
#(
parameter addr_width=7,
parameter data_width=8
)
(
input clk,
input [addr_width-1:0] addr,
input [data_width-1:0] din,
inout [data_width-1:0] q,
input rd_n,
input wr_n,
input ce_n
);
reg [data_width-1:0] data;
reg [data_width-1:0] mem[(1<<addr_width)-1:0];
assign q = ~ce_n ? data : {data_width{1'bz}};
always @(posedge clk) begin
if (~rd_n) data <= mem[addr];
if (~wr_n & ~ce_n) mem[addr] <= din;
end
And this for a 256x8-bit :
module ram_
#(
parameter addr_width=8,
parameter data_width=8
)
(
input clk,
input [addr_width-1:0] addr,
input [data_width-1:0] din,
inout [data_width-1:0] q,
input rd_n,
input wr_n,
input ce_n
);
reg [data_width-1:0] data;
reg [data_width-1:0] mem[(1<<addr_width)-1:0];
assign q = ~ce_n ? data : {data_width{1'bz}};
always @(posedge clk) begin
if (~rd_n) data <= mem[addr];
if (~wr_n & ~ce_n) mem[addr] <= din;
end
endmodule
I implemented these modules in the whole block schematics under Quartus (translated from TTL schematics).When I try to do a compile I get the errors in the attached log.
I attach also a the snippet of TTL schematics that I'm trying to simulate in Quartus.Thanks in advance for any help or suggestion.