Commit Graph

674 Commits (7566f04fe3f0807cde42b1965feae57fe4346476)
 

Author SHA1 Message Date
Anton Blanchard 9687034d78 Add a decode bit to mark an instruction as single through the pipeline
This is used by the pipelining patches. Mark everyone as single through
the pipeline to start.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
5 years ago
Benjamin Herrenschmidt b0ade2857f decode1 array fix header
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
5 years ago
Anton Blanchard a9065796ad
Merge pull request #33 from antonblanchard/cr-fix
Fix CR forwarding
5 years ago
Anton Blanchard e0dfb3dce1
Merge pull request #32 from antonblanchard/register-file-forwarding
Add forwarding in the register file
5 years ago
Benjamin Herrenschmidt 8bfd6e5eae Use simulated UART in core test bench
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
5 years ago
Benjamin Herrenschmidt 1b9c6f4647 Make sim poll non-blocking
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
5 years ago
Benjamin Herrenschmidt 48b689b665 Add simulated UART design
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
5 years ago
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>
5 years ago
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>
5 years ago
Anton Blanchard 2241b71674
Merge pull request #31 from antonblanchard/no-second-write-port-2
More second write port removal
5 years ago
Anton Blanchard 045a00c5d7
Merge pull request #30 from antonblanchard/writeback-assert
Add some assertions to writeback
5 years ago
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>
5 years ago
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>
5 years ago
Anton Blanchard 4c872619b3
Merge pull request #29 from antonblanchard/no-second-write-port
Remove second write port
5 years ago
Anton Blanchard f384f504a1
Merge pull request #28 from antonblanchard/loadstore-cleanup
Remove some more loadstore debug
5 years ago
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>
5 years ago
Anton Blanchard aee5fded44 Remove some more loadstore debug
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
5 years ago
Anton Blanchard ff9070d727
Merge pull request #27 from antonblanchard/fix-cr
Fix issues with CR rework
5 years ago
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>
5 years ago
Anton Blanchard b8d93728d7
Merge pull request #26 from antonblanchard/silence-loadstore-debug
Silence some loadstore related debug
5 years ago
Anton Blanchard a1ab1d3e56
Merge pull request #25 from antonblanchard/register_file_printing
Clean up register read debug output
5 years ago
Anton Blanchard a5d31bb554
Merge pull request #24 from antonblanchard/cr_file_cleanup
Rework CR file and add forwarding
5 years ago
Anton Blanchard 5d82af5204 Silence some loadstore related debug
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
5 years ago
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>
5 years ago
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>
5 years ago
Anton Blanchard 7c2a2b7414
Merge pull request #19 from antonblanchard/cmod-a7
Cmod A7-35 support
5 years ago
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>
5 years ago
Anton Blanchard 14da542d4a
Merge pull request #20 from antonblanchard/reset-rework2
Rework reset code
5 years ago
Anton Blanchard 0832fed06c
Merge pull request #22 from antonblanchard/store-fix
Stores need to wait for wishbone write ack
5 years ago
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>
5 years ago
Anton Blanchard c64bf23c1a
Merge pull request #21 from antonblanchard/xdc-update
Add CONFIG_VOLTAGE and CFGBVS entries
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
Anton Blanchard e39400681b
Merge pull request #18 from mikey/verific
Fix verific script with new VHDL files
5 years ago
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>
5 years ago
Anton Blanchard a15eb4e28d
Merge pull request #17 from antonblanchard/writeback-signal
Use a better input signal in writeback
5 years ago
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>
5 years ago
Anton Blanchard 3f59396907
Merge pull request #16 from antonblanchard/decode2_rework2
Rework decode2
5 years ago
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>
5 years ago
Anton Blanchard d1fdc286c4
Merge pull request #13 from mikey/dynamic-ranges
Remove dynamic ranges from code
5 years ago
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>
5 years ago
Anton Blanchard 7a85e3877d
Merge pull request #10 from antonblanchard/arty-fix
Arty A7 reset pin is C2
5 years ago
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>
5 years ago
Anton Blanchard 3819768d2a
Merge pull request #7 from riktw/fusesoc_arty_a7
Fusesoc arty a7
5 years ago
Anton Blanchard 5aba4e7346
Merge pull request #9 from antonblanchard/travis-fix
A few Travis CI fixes
5 years ago
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>
5 years ago
riktw 4ebd6fc1f7 Added support for building for Arty A7 boards 5 years ago
Anton Blanchard f98370f9e6
Merge pull request #5 from antonblanchard/travis-test
Add an initial travis.yml
5 years ago
Anton Blanchard 2ee269abdb Add an initial travis.yml
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
5 years ago