1)每个always块,必须要有begin end 其它如if~else、case的分支语句,超过一句的也都要有begin end
2)Part-select of scalar wire array 'q' is illegal
Try changing:
wire q[7:0]; wire q_[7:0];
to:
wire [7:0] q; wire [7:0] q_;
That clears up compile errors for me.
(2)
有 define 与include 语句,那么define的作用域是全局
如果把 include 拿掉 把verilog文件加入工程, define的作用域不会 作用于 子verilog 文件 `define FPGA