
Syntax Question involving parameters, function, ranges...
Hi Milan,
Unfortunately variable width slices are not supported by Verilog or Vhdl.
I think you have to unroll the for loop by hand.
Regards
AC
Quote:
> Hi:
> Need Help
> Trying to write a parameter slice (INIT) to a memory location.
> Getting Error : Range must be bounded by constant expression
> Can anyone point out the mistake or the correct way to do it.
> ------------snippet-------------------------------
> //call a memory write function with address and data
> parameter INIT = 8'h00000000;
> integer count;
> initial begin
> for (count=0;count<2;count=count +1) begin
> $external_memory_write_pli_call(count,INIT[count*4+3 :
> count]);//(address,data)<=ERROR
> end
> end
> ---------------end-------------------------------
> Thanks in Advance
> Milan
> --