diff options
| author | Julian Blake Kongslie | 2021-03-28 14:03:50 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2021-03-28 14:03:50 -0700 |
| commit | 93a4ad185a48e8f2da76cc62fca8160ba4c960a6 (patch) | |
| tree | b8bbd0f85b31fd85bcc8efb961bbc66fc8b11fec | |
| parent | Parallel verilator build. (diff) | |
| download | toycpu-93a4ad185a48e8f2da76cc62fca8160ba4c960a6.tar.xz | |
| -rw-r--r-- | altera/clocks.sdc | 2 | ||||
| -rw-r--r-- | altera/jtag.cdf | 5 | ||||
| -rw-r--r-- | hdl/top.sv | 6 | ||||
| -rw-r--r-- | tcl/init.tcl | 2 |
4 files changed, 10 insertions, 5 deletions
diff --git a/altera/clocks.sdc b/altera/clocks.sdc index f613011..239c91a 100644 --- a/altera/clocks.sdc +++ b/altera/clocks.sdc | |||
| @@ -1 +1,3 @@ | |||
| 1 | # This is the clock for timing analysis, not timing-driven synthesis. | ||
| 2 | # See init.tcl for the other clock. | ||
| 1 | create_clock -period "50 MHz" clk | 3 | create_clock -period "50 MHz" clk |
diff --git a/altera/jtag.cdf b/altera/jtag.cdf index cbe240b..ac80090 100644 --- a/altera/jtag.cdf +++ b/altera/jtag.cdf | |||
| @@ -1,10 +1,9 @@ | |||
| 1 | /* XXX Copy this from a working setup on Ducky hardware */ | ||
| 2 | JedecChain; | 1 | JedecChain; |
| 3 | FileRevision(JESD32A); | 2 | FileRevision(JESD32A); |
| 4 | DefaultMfr(6E); | 3 | DefaultMfr(6E); |
| 5 | 4 | ||
| 6 | P ActionCode(Cfg) | 5 | P ActionCode(Ign) |
| 7 | Device PartName(10CL025YU256) Path("C:/Users/mike/Desktop/toycpu/") File("toycpu.pof") MfrSpec(OpMask(1)); | 6 | Device PartName(10CL025Y) MfrSpec(OpMask(0)); |
| 8 | 7 | ||
| 9 | ChainEnd; | 8 | ChainEnd; |
| 10 | 9 | ||
| @@ -11,8 +11,10 @@ module top | |||
| 11 | , input bit reset_n // verilator public | 11 | , input bit reset_n // verilator public |
| 12 | ); | 12 | ); |
| 13 | 13 | ||
| 14 | bit reset; | 14 | bit reset = 0; |
| 15 | assign reset = !reset_n; | 15 | bit have_reset = 0; |
| 16 | always_ff @(posedge clk) if (reset) have_reset <= 1; | ||
| 17 | assign reset = !reset_n || !have_reset; | ||
| 16 | 18 | ||
| 17 | bit [7:0] rom [0:(1<<ROM_BITS)-1]; | 19 | bit [7:0] rom [0:(1<<ROM_BITS)-1]; |
| 18 | initial $readmemh("mem/rom.hex", rom); | 20 | initial $readmemh("mem/rom.hex", rom); |
diff --git a/tcl/init.tcl b/tcl/init.tcl index 6621e6a..689a61c 100644 --- a/tcl/init.tcl +++ b/tcl/init.tcl | |||
| @@ -14,6 +14,8 @@ proc pin {loc net} { | |||
| 14 | pin E1 clk | 14 | pin E1 clk |
| 15 | pin J15 reset_n | 15 | pin J15 reset_n |
| 16 | 16 | ||
| 17 | # This is the clock for timing-driven synthesis, not timing analysis. | ||
| 18 | # See clocks.sdf for the other clock. | ||
| 17 | create_base_clock -fmax "50 MHz" clk | 19 | create_base_clock -fmax "50 MHz" clk |
| 18 | 20 | ||
| 19 | proc add_files {typ ext dir} { | 21 | proc add_files {typ ext dir} { |
