T
taco
Guest
could somebody point to a solution for the following 2 xilinx problems:
I'm trying to store data directly into a ram instantiation in the following
way:
....
async_mem rom (
//outputs
.rd_data (di),
//inputs
.wr_clk (1'b0),
.wr_data (1'b0),
.wr_cs (1'b0),
.addr (A[14:0]),
.rd_cs (rom_rd_cs));
initial
begin
wait_n = 1;
int_n = 1;
nmi_n = 1;
busrq_n = 1;
//init program_code
$readmemh ("test.mem", rom.mem);
end
Xilinx doesn't report any syntax errors, but in the translate phase I get:
"Second argument to system task $readmemh must be memory type."
the mem variable is declared in the async_mem file as:
reg [7:0] mem [0:depth-1];
So it's really a memory declaration. Bug?
The seccond strange error message is for the following code snippet:
task clear_ram;
118 integer i;
119 begin
120 for (i=0; i < 32768; i = i+1)
121 ram.mem = 0;
122 end
123 endtask
124
If I call this task I get the strange message
"For loop stop condition should depend on loop variable or be static."
I cannot see what's wrong with this.
Taco
I'm trying to store data directly into a ram instantiation in the following
way:
....
async_mem rom (
//outputs
.rd_data (di),
//inputs
.wr_clk (1'b0),
.wr_data (1'b0),
.wr_cs (1'b0),
.addr (A[14:0]),
.rd_cs (rom_rd_cs));
initial
begin
wait_n = 1;
int_n = 1;
nmi_n = 1;
busrq_n = 1;
//init program_code
$readmemh ("test.mem", rom.mem);
end
Xilinx doesn't report any syntax errors, but in the translate phase I get:
"Second argument to system task $readmemh must be memory type."
the mem variable is declared in the async_mem file as:
reg [7:0] mem [0:depth-1];
So it's really a memory declaration. Bug?
The seccond strange error message is for the following code snippet:
task clear_ram;
118 integer i;
119 begin
120 for (i=0; i < 32768; i = i+1)
121 ram.mem = 0;
122 end
123 endtask
124
If I call this task I get the strange message
"For loop stop condition should depend on loop variable or be static."
I cannot see what's wrong with this.
Taco