1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-02-07 00:27:22 +00:00
Commit Graph

72 Commits

Author SHA1 Message Date
Anton Blanchard
a9065796ad Merge pull request #33 from antonblanchard/cr-fix
Fix CR forwarding
2019-09-09 22:44:34 +10:00
Anton Blanchard
e0dfb3dce1 Merge pull request #32 from antonblanchard/register-file-forwarding
Add forwarding in the register file
2019-09-09 22:21:30 +10:00
Benjamin Herrenschmidt
8bfd6e5eae Use simulated UART in core test bench
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2019-09-09 22:18:55 +10:00
Benjamin Herrenschmidt
1b9c6f4647 Make sim poll non-blocking
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2019-09-09 22:18:51 +10:00
Benjamin Herrenschmidt
48b689b665 Add simulated UART design
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2019-09-09 22:18:48 +10:00
Anton Blanchard
9cbdecb561 Fix CR forwarding
We weren't actually forwarding writes in the same cycle. Not a
problem right now, but noticed when testing the pipelining series.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-09 22:16:11 +10:00
Anton Blanchard
79a14c8e37 Add forwarding in the register file
We need this for the upcoming pipelining patches.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-09 20:06:46 +10:00
Anton Blanchard
2241b71674 Merge pull request #31 from antonblanchard/no-second-write-port-2
More second write port removal
2019-09-09 16:12:59 +10:00
Anton Blanchard
045a00c5d7 Merge pull request #30 from antonblanchard/writeback-assert
Add some assertions to writeback
2019-09-09 16:12:39 +10:00
Anton Blanchard
31a6fb6ef5 More second write port removal
I missed the register file updates for the second write port
removal.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-09 16:00:49 +10:00
Anton Blanchard
fa04936c92 Add some assertions to writeback
We want to make sure we never complete more than one
instruction per cycle, or write back more than one GPR
or CR per cycle.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-09 15:54:09 +10:00
Anton Blanchard
4c872619b3 Merge pull request #29 from antonblanchard/no-second-write-port
Remove second write port
2019-09-09 15:51:34 +10:00
Anton Blanchard
f384f504a1 Merge pull request #28 from antonblanchard/loadstore-cleanup
Remove some more loadstore debug
2019-09-09 15:50:46 +10:00
Anton Blanchard
fb4cad6eaf Remove second write port
We only need two write ports for load with update instructions.
Having two write ports just for this instruction is expensive.

For now we will force them to be the only instruction in the
pipeline, and take two cycles of writeback.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-09 15:18:09 +10:00
Anton Blanchard
aee5fded44 Remove some more loadstore debug
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-09 15:03:06 +10:00
Anton Blanchard
ff9070d727 Merge pull request #27 from antonblanchard/fix-cr
Fix issues with CR rework
2019-09-09 13:35:12 +10:00
Anton Blanchard
0254e40685 Fix issues with CR rework
It simulated fine, but didn't synthesize. Fix some obvious issues
to get us going again.

Fixes: 9fbaea6f08 ("Rework CR file and add forwarding")
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-09 13:10:07 +10:00
Anton Blanchard
b8d93728d7 Merge pull request #26 from antonblanchard/silence-loadstore-debug
Silence some loadstore related debug
2019-09-09 11:42:55 +10:00
Anton Blanchard
a1ab1d3e56 Merge pull request #25 from antonblanchard/register_file_printing
Clean up register read debug output
2019-09-09 11:42:41 +10:00
Anton Blanchard
a5d31bb554 Merge pull request #24 from antonblanchard/cr_file_cleanup
Rework CR file and add forwarding
2019-09-09 11:41:44 +10:00
Anton Blanchard
5d82af5204 Silence some loadstore related debug
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-09 11:23:29 +10:00
Anton Blanchard
04eb9583e6 Clean up register read debug output
Right now we continually print all 3 possible GPRs an instruction
may be using. Add signals so we only print GPRs when they are
actually read. This should hopefully optimise away when synthesized.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-09 11:18:26 +10:00
Anton Blanchard
9fbaea6f08 Rework CR file and add forwarding
Handle the CR as a single field with per nibble enables. Forward any
writes in the same cycle.

If this proves to be an issue for timing, we may want to revisit
this in the future. For now, it keeps things simple.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-09 10:18:10 +10:00
Anton Blanchard
7c2a2b7414 Merge pull request #19 from antonblanchard/cmod-a7
Cmod A7-35 support
2019-09-08 18:04:38 +10:00
Anton Blanchard
270d7b1b9a Cmod A7-35 support
This adds support for the Digilane Cmod A7-35.

I had to use the MMCM because the clock (12 MHz) is below the PLL
minimum of 19 MHz.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-08 16:36:50 +10:00
Anton Blanchard
14da542d4a Merge pull request #20 from antonblanchard/reset-rework2
Rework reset code
2019-09-08 16:34:10 +10:00
Anton Blanchard
0832fed06c Merge pull request #22 from antonblanchard/store-fix
Stores need to wait for wishbone write ack
2019-09-08 16:23:54 +10:00
Anton Blanchard
021d427d3f Stores need to wait for wishbone write ack
I wasn't waiting to get a wishbone ack back on stores before continuing.
This creates all sorts of problems when we add pipelining and send
loads and stores down the pipe faster.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-08 16:04:40 +10:00
Anton Blanchard
c64bf23c1a Merge pull request #21 from antonblanchard/xdc-update
Add CONFIG_VOLTAGE and CFGBVS entries
2019-09-08 10:19:29 +10:00
Anton Blanchard
63295526ad Add CONFIG_VOLTAGE and CFGBVS entries
Remove a couple of warnings from Vivado.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-08 09:49:39 +10:00
Anton Blanchard
03fd06deaf Rework SOC reset
The old reset code was overly complicated and never worked properly.
Replace it with a simpler sequence that uses a couple of shift registers
to assert resets:

- Wait a number of external clock cycles before removing reset from
  the PLL.

- After the PLL locks and the external reset button isn't pressed,
  wait a number of PLL clock cycles before removing reset from the SOC.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-08 07:40:19 +10:00
Anton Blanchard
a53ad60014 Rename a few reset signals
clk -> ext_clk
reset_n -> ext_rst
reset -> rst

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-07 21:33:50 +10:00
Anton Blanchard
e39400681b Merge pull request #18 from mikey/verific
Fix verific script with new VHDL files
2019-09-06 20:54:50 +10:00
Michael Neuling
83d773090e Fix verific script with new VHDL files
This really needs to be auto generated, but here we are.

Signed-off-by: Michael Neuling <mikey@neuling.org>
2019-09-06 15:05:03 +10:00
Anton Blanchard
a15eb4e28d Merge pull request #17 from antonblanchard/writeback-signal
Use a better input signal in writeback
2019-09-06 10:09:26 +10:00
Anton Blanchard
147b259691 Use a better input signal in writeback
w_in comes from the execution unit, it makes more sense to call
it e_in.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-06 09:48:24 +10:00
Anton Blanchard
3f59396907 Merge pull request #16 from antonblanchard/decode2_rework2
Rework decode2
2019-09-04 06:33:40 +10:00
Anton Blanchard
5e140298a5 Rework decode2
The decode2 stage was spaghetti code and needed cleaning up.
Create a series of functions to pull fields from a ppc instruction
and also a series of helpers to extract values for the execution
units.

As suggested by Paul, we should pass all signals to the execution
units and only set the valid signal conditionally, which should
use less resources.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-03 16:47:54 +10:00
Anton Blanchard
d1fdc286c4 Merge pull request #13 from mikey/dynamic-ranges
Remove dynamic ranges from code
2019-08-31 13:34:38 +10:00
Michael Neuling
4d5abfb430 Remove dynamic ranges from code
Some VHDL compilers like verific [1] don't like these, so let's remove
them. Lots of random code changes, but passes make check.

Also add basic script to run verific and generate verilog.

1. https://www.verific.com/

Signed-off-by: Michael Neuling <mikey@neuling.org>
2019-08-30 16:13:48 +10:00
Anton Blanchard
7a85e3877d Merge pull request #10 from antonblanchard/arty-fix
Arty A7 reset pin is C2
2019-08-30 09:06:48 +10:00
Anton Blanchard
5379b805ec Arty A7 reset pin is C2
Use C2 for reset, and fix up a few whitespace issues.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-08-30 08:39:44 +10:00
Anton Blanchard
3819768d2a Merge pull request #7 from riktw/fusesoc_arty_a7
Fusesoc arty a7
2019-08-30 08:38:13 +10:00
Anton Blanchard
5aba4e7346 Merge pull request #9 from antonblanchard/travis-fix
A few Travis CI fixes
2019-08-30 08:26:35 +10:00
Anton Blanchard
6c8d28a642 A few Travis CI fixes
- Switch to using ghdl/vunit:llvm, it's a smaller container
- We need to "apt update" before installing packages

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-08-30 08:12:54 +10:00
riktw
4ebd6fc1f7 Added support for building for Arty A7 boards 2019-08-29 22:37:48 +02:00
Anton Blanchard
f98370f9e6 Merge pull request #5 from antonblanchard/travis-test
Add an initial travis.yml
2019-08-29 07:46:51 +10:00
Anton Blanchard
2ee269abdb Add an initial travis.yml
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-08-28 22:33:53 +10:00
Anton Blanchard
0fd18c2455 Add srd and srw
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-08-28 14:50:37 +10:00
Anton Blanchard
73daacbcd4 Add sim only divw
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-08-28 14:07:29 +10:00