Forum Discussion
Altera_Forum
Honored Contributor
16 years agoHow to accumulate variable using submodule
I am trying to model an equation of the type: x=bx+c in Verilog. I've written a module which takes input 'x' and gives output 'bx+c'. However since the input and output out of a submodule hav...
Altera_Forum
Honored Contributor
16 years agoalways @(posedge clk)
begin
if(rst) xreg <= 0;
else xreg <= xout;
end
assign xin=xreg;