what is the error in the following code. in it the main module is "test". in that module's "always" block another module "counter" is called. but it shows error. how can i solve the problem? how can i call another module in always block?
Hi there, First of all, there is a newsgroup for Verilog discussions: comp.lang.verilog (and I noticed that you just post your question there as well).
You cannot put a module in a process that only execute at clock edge. Try think that the counter module is a hardware, and you can't make it appear only at clock edge, it exist in the design all the time. So instead of putting it in a process, you should instantiate it.
module test(clock,reset,count); input clock, reset; output [3:0] count; // reg [3:0] count; // This line is removed because // it is not controlled by a process.