Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f37d3e2bf6 | |||
| 6af2e6ffe4 |
@@ -34,12 +34,20 @@ module z3_demo_ice_top (
|
||||
wire irq;
|
||||
wire cmp_hit;
|
||||
|
||||
// ------------------------------------------------------------ 硬件自激时钟发生器
|
||||
// Palladium 原生支持将此类时钟综合为物理机台内部的硬件自振荡时钟 (ixc_uClkGen)
|
||||
// 无需外接机箱硬件线缆,通电自动全速自振荡
|
||||
reg clk_osc = 1'b0;
|
||||
always #10 clk_osc = ~clk_osc;
|
||||
|
||||
wire clk = clk_osc;
|
||||
|
||||
// ------------------------------------------------------------ 硬件上电自动复位 (POR)
|
||||
// 烧录至机台后自动拉低复位 20 个周期,随后自动释放,无需外部控制台执行容易崩溃的 force
|
||||
reg [5:0] por_cnt = 6'd0;
|
||||
reg por_done = 1'b0;
|
||||
|
||||
always @(posedge clk_in) begin
|
||||
always @(posedge clk) begin
|
||||
if (por_cnt < 6'd25) begin
|
||||
por_cnt <= por_cnt + 6'd1;
|
||||
por_done <= 1'b0;
|
||||
@@ -51,7 +59,7 @@ module z3_demo_ice_top (
|
||||
wire effective_rst_n = (rst_n_in === 1'b0) ? 1'b0 : por_done;
|
||||
|
||||
z3_demo_top dut (
|
||||
.clk (clk_in),
|
||||
.clk (clk),
|
||||
.rst_n (effective_rst_n),
|
||||
.paddr (paddr),
|
||||
.psel (psel),
|
||||
@@ -111,7 +119,7 @@ module z3_demo_ice_top (
|
||||
endcase
|
||||
end
|
||||
|
||||
always @(posedge clk_in or negedge effective_rst_n) begin
|
||||
always @(posedge clk or negedge effective_rst_n) begin
|
||||
if (!effective_rst_n) begin
|
||||
state <= ST_WAIT;
|
||||
wait_cnt <= 16'd0;
|
||||
|
||||
@@ -19,6 +19,7 @@ echo "======================================================================"
|
||||
set +e
|
||||
ixcom -clean -ua +dut+z3_demo_ice_top \
|
||||
-z3 \
|
||||
+iscDelay+z3_demo_ice_top \
|
||||
-ignoreSimSetupCheck \
|
||||
-ignoreHWPlatformSetupCheck \
|
||||
-ignoreVersionCheck \
|
||||
|
||||
Reference in New Issue
Block a user