【求助】这两种写法有什么区别
(1)module led_shift(
input clk,
input reset,
input dir_r_l,
output led
);
reg led;
(2)
module led_shif(clk,reset,dir_r_l,led);
input clk;
input reset;
input dir_r_l;
output led;
reg led;
为什么第一种写法会有语法错误?
谢谢 第一种写法对led变量的声明有错误,应该在定义其为输出变量的时候同时将其定义为reg型变量。 回复 5# liuyi6776
谢谢,这个是从哪里下的啊 回复 2# njithjw
是写成output reg led 吗? 回复 3# feihu612
谢谢,刚开始,还没有入门,以后还望多多指教
页:
[1]
