新手再问一个VERILOG初始化的问题,希望得到帮助,谢谢!

- UID
- 146921
- 性别
- 男
|
新手再问一个VERILOG初始化的问题,希望得到帮助,谢谢!
module cpld_code2(ce)
output ce;
reg reg_ce;
initial reg_ce=1;
assign ce=reg_ce;
endmodule
这段程序的目的是想试一下初始化,想在定义的输出引脚ce量到高电平,但是没量到,为什么啊? |
|
|
|
|
|
 
- UID
- 132277
- 性别
- 男
|
╔☆→────────────────←☆╗
┊寻觅在电子中, , , 寻求适合自己的一席┊┊┊┊
┊也许生活本忙碌, 想享受安逸只能是心态了吧┊
╚☆→────────────────←☆╝ & |
|
|
|
|
|

- UID
- 146921
- 性别
- 男
|
|
|
|
|
|
 
- UID
- 132834
- 性别
- 男
|
|
|
|
|
|

- UID
- 146921
- 性别
- 男
|
|
|
|
|
|
 
- UID
- 132834
- 性别
- 男
|
加复位信号就是,你需要在芯片的某个脚加上高或者低电平,并且将这个信号作为复位信号,当复位信号有效时,给某个触发器或者锁存器赋值。型如:
always @(posedge clk or negedge rst_n)
begin
if (!rst_n) oe<=0;
else
......
......
end
写约束文件需要知道你用的是什么开发环境和芯片。
如果是Xilinx 的ISE建立工程后加入UCF约束文件,打开约束编辑器,在misc -FFs/Latch init里面编辑初值。
如果是Altera 的Quartus 建立工程后打开assignment editor,用node finder选择好寄存器,assignment name 选择Power UP Level ,然后设置Vaule为High或者Low就行。
|
|
|
|
|
|

- UID
- 146921
- 性别
- 男
|
谢谢楼上的,我用的是xilinx webpack,跟你说的ISE是一样的吗,我一直都没搞清楚两者之间的关系 |
|
|
|
|
|

- UID
- 146921
- 性别
- 男
|
我打开了xilinx constrants editor,也看到了misc,但是没找到FFs/Latch init |
|
|
|
|
|
 
- UID
- 132834
- 性别
- 男
|
不会啊,misc最下面不就是吗?INIT Values For,仔细找找看。 |
|
|
|
|
|
- UID
- 132434
- 性别
- 男
|
xilinx webpack是网上可以下载到的一个免费软件,ise是xilinx出的一个号称要钱的软件,其实可以从不同渠道得到他的正版而不需要花钱,功能上xilinx webpack有一些限制;
感觉楼主是从做纯软件转过来的吧?硬件描述语言虽然是软件,但是它涉及到了很多硬件的东西,他的运行环境是硬件电路,而不是计算机中的软件平台,所以有时候考虑问题的时候注意一下你所使用的芯片的硬件特性会对你有不少帮助; |
|
|
|
|
|