B
Brian Dam Pedersen
Guest
In Icarus Verilog I am allowed to write something along the lines of
module counter (out,clk);
output [4:0] out;
input clk;
reg [4:0] cnt=0;
assign out = cnt + 2;
always @ (posedge clk)
cnt <= cnt + 2;
endmodule
module test(count_res_p2,count_res,clk);
input clk;
counter C(count_res_p2,clk);
assign count_res = C.cnt;
endmodule
The last assignment can be useful e.g. for gleaning into a module during
test. Now I want this to synthesize in xst (Webpack 7.1i). While it
seems to synthesize, count_res remains stuck at 0. Why is this ? Is
there anyway to do this in xst ?
Regards
-- Brian
module counter (out,clk);
output [4:0] out;
input clk;
reg [4:0] cnt=0;
assign out = cnt + 2;
always @ (posedge clk)
cnt <= cnt + 2;
endmodule
module test(count_res_p2,count_res,clk);
input clk;
counter C(count_res_p2,clk);
assign count_res = C.cnt;
endmodule
The last assignment can be useful e.g. for gleaning into a module during
test. Now I want this to synthesize in xst (Webpack 7.1i). While it
seems to synthesize, count_res remains stuck at 0. Why is this ? Is
there anyway to do this in xst ?
Regards
-- Brian