1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-01-22 18:31:27 +00:00

117 Commits

Author SHA1 Message Date
Anton Blanchard
6cbf456388 SOC memory wishbone should clear ACK regardless of STB
The memory wishbone doesn't clear ACK and move the state machine on
until STB is de-asserted. This seems like it isn't compliant with
the spec and results in a maximum throughput of 1 transfer every
3 cycles.

Fixing this improves the situation to one transfer every 2 cycles.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-12 15:57:00 +10:00
Anton Blanchard
67446709ca
Merge pull request #48 from antonblanchard/clk_gen_bypass
Fix clk_gen_bypass
2019-09-12 13:03:33 +10:00
Anton Blanchard
d89a9929fd Fix clk_gen_bypass
I broke clk_gen_bypass when updating the SOC reset code.

Fixes 03fd06deaf9f ("Rework SOC reset")
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-12 12:25:18 +10:00
Anton Blanchard
80aa781454
Merge pull request #47 from antonblanchard/if-fix
Explicitly check against '1' in if statements
2019-09-12 09:46:22 +10:00
Anton Blanchard
ca6f84efd6
Merge pull request #46 from antonblanchard/record-fix
Remove names from end record statements
2019-09-12 09:46:01 +10:00
Anton Blanchard
b9e28598b4 Explicitly check against '1' in if statements
nvc doesn't like what I think is a VHDL 2008 construct. Lets just
check against '1' explicitly.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-12 09:19:31 +10:00
Anton Blanchard
142a722ce4 Remove names from end record statements
These are optional, and vhdlpp from iverilog barfs on them.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-12 09:04:02 +10:00
Anton Blanchard
43f81773b4
Merge pull request #45 from antonblanchard/fixes
Fix a couple of issues in the recent pipelining merge
2019-09-11 22:53:47 +10:00
Anton Blanchard
7caf71ba71 Fix issue in loadstore1
We weren't using the register in this stage.

Fixes: 819f8200905f ("Register outputs on loadstore1")
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-11 22:40:53 +10:00
Anton Blanchard
95442cd62c Fix issue in execute2
We weren't using the register in this stage.

Fixes: c7aa683ba8aa ("Register outputs on execute2")
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-11 22:39:30 +10:00
Anton Blanchard
1ba84b56dd
Merge pull request #44 from antonblanchard/nia-remove
Remove nia from loadstore and multiply
2019-09-11 21:58:01 +10:00
Anton Blanchard
1d00c75ecc Remove nia from loadstore and multiply
Neither unit needs the NIA, so remove it.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-11 21:42:37 +10:00
Anton Blanchard
8b88e26ece
Merge pull request #43 from mikey/trivial
Remove FIXME comment
2019-09-11 21:42:00 +10:00
Michael Neuling
1e1b799382 Remove FIXME comment
This was mistakenly left behind in 4d5abfb430d1 ("Remove dynamic
ranges from code")

Signed-off-by: Michael Neuling <mikey@neuling.org>
2019-09-11 16:51:02 +10:00
Anton Blanchard
ff1455dea6
Merge pull request #41 from mikey/travis
Allow a full make check on Travis
2019-09-11 16:05:05 +10:00
Anton Blanchard
2f3ca35a6e
Merge pull request #42 from antonblanchard/fetch-rework-v2
Fetch rework
2019-09-11 16:04:10 +10:00
Anton Blanchard
4528ef2b43 Reformat core.vhdl 2019-09-11 13:23:45 +10:00
Anton Blanchard
a2df2a10a2 Remove sim console
We can force all existing code to use the UART console
by passing 0 in bit zero of the sim config register.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-11 13:23:45 +10:00
Anton Blanchard
68533c4cfb Reduce multiply to 2 cycles
We want all non load/store ops to take 2 cycles to make
tracking write back easier.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-11 13:23:45 +10:00
Anton Blanchard
9fe8d211eb Register outputs on writeback
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-11 13:23:45 +10:00
Anton Blanchard
c7aa683ba8 Register outputs on execute2
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-11 13:23:45 +10:00
Anton Blanchard
819f820090 Register outputs on loadstore1
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-11 13:23:45 +10:00
Anton Blanchard
a8f8c54b77 Move debug execute output into decode2
This covers all units, and we avoid double printing.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-11 13:23:45 +10:00
Anton Blanchard
92a7152370 Rework pipeline, add stall and flush signals
This adds stall and flush signals to the pipeline.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-11 13:23:45 +10:00
Michael Neuling
6b06d5f67d Allow a full make check on Travis
Some Travis instances allow more CPU time. On these we can perform the
full 'make check'.

This patch allows this longer `make check`. To enable it you need to
go into your Travis configuration and add a TRAVIS_FULL_CHECK
environment variable.

If you don't add this environment, the shorter make check_light is
still run.

Signed-off-by: Michael Neuling <mikey@neuling.org>
2019-09-11 10:41:58 +10:00
Anton Blanchard
3b32abcb5d
Merge pull request #40 from antonblanchard/makefile-dependencies
Update Makefile dependencies
2019-09-11 07:48:19 +10:00
Anton Blanchard
b6b2c78163 Update Makefile dependencies
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2019-09-11 07:32:00 +10:00
Benjamin Herrenschmidt
d3acb5cce9 Switch soc to use std_ulogic
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2019-09-10 18:28:04 +01:00
Benjamin Herrenschmidt
3ac1dbc737 Share soc.vhdl between FPGA and sim
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2019-09-10 16:57:47 +01:00
Benjamin Herrenschmidt
d21ef5836d Pass wishbone record to bram memory module
(And rename it to mw_soc_memory).

This makes soc.vhdl simpler and provides the same interface as
the simulated memory, which will help when sharing soc.vhdl
with sim later

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2019-09-10 16:57:47 +01:00
Benjamin Herrenschmidt
1d66e1f981 Rework wishbone slave address decoding
Don't make it synchronous, no latches

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2019-09-10 16:50:49 +01:00
Benjamin Herrenschmidt
c97b080d8c Move wishbone arbiter out of the core
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2019-09-10 16:50:49 +01:00
Benjamin Herrenschmidt
310a56c076 Re-indent and reformat soc.vhdl
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2019-09-10 16:50:49 +01:00
Benjamin Herrenschmidt
a69a93b466 Split FPGA toplevel from soc
This will be useful when we start needing different toplevels for
different boards.

We keep the reset and clock generators in the toplevel as they will
eventually be taken over by litedram when we integrate it, and they
are more likely to change on different system types.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2019-09-10 16:50:49 +01:00
Anton Blanchard
5ee86e7621
Merge pull request #39 from antonblanchard/no-x-state
Don't send out X state from the memory behavioural
2019-09-10 17:07:09 +10:00
Anton Blanchard
dce2e06f4c Don't send out X state from the memory behavioural
Just send out all 1s.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-10 16:46:41 +10:00
Anton Blanchard
c3a5782bf4
Merge pull request #36 from mikey/gitignore
Add new files to git ignore
2019-09-10 16:31:37 +10:00
Anton Blanchard
419b95a447
Merge pull request #38 from antonblanchard/multiply-warn
Quieten multiply warning
2019-09-10 16:31:08 +10:00
Anton Blanchard
a22afbdb5b Quieten multiply warning
We no longer gate multiply with the valid signal, so it's complaining
a lot. Comment out the warning.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-10 15:31:54 +10:00
Michael Neuling
5ae92a721f Add new files to git ignore
Signed-off-by: Michael Neuling <mikey@neuling.org>
2019-09-10 15:01:10 +10:00
Anton Blanchard
d79c994158
Merge pull request #35 from antonblanchard/multiply-opt
Simplify multiply
2019-09-10 09:14:31 +10:00
Anton Blanchard
18b9b39a2c Simplify multiply
No need to gate everything with the valid bit.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-09-10 08:58:30 +10:00
Anton Blanchard
47f39440f2
Merge pull request #34 from antonblanchard/decode-table
Decode table
2019-09-10 08:09:48 +10:00
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>
2019-09-10 07:19:57 +10:00
Benjamin Herrenschmidt
b0ade2857f decode1 array fix header
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2019-09-10 07:14:04 +10:00
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