This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
forked from sifive/freedom
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modifications: - Increase clock to 65 MHz - Enable user mode - Increase HW breakpoints to 8 - Add 2 perf counters, hpmcounter3 and hpmcounter4 - Add Xilinx EthernetLite core for Arty - Make icache 4-way set associative - Map ITIM at 0x0800_0000 - Expand DTIM to 64k - Add 3 local interrupts and map GPIO BTN0-BTN2 to them - Add temporary PMOD JA remaps for robotic arm
- Loading branch information
Showing
15 changed files
with
637 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# X300 | ||
|
||
This repository contains the X300, a modified version of [SiFive's Freedom E300 | ||
Platform](https://github.com/sifive/freedom/tree/3624efff1819e52cec30c72f9085158189f8b53f) | ||
to support [MultiZone](https://hex-five.com/products/) and IoT applications. | ||
Here's a comparison between the E300 and the X300: | ||
|
||
| E300 | X300 | | ||
| ---------------- | -------------------------------------------- | | ||
| RV32ACIM | RV32ACIMU | | ||
| 32.5 MHz clock | 65 MHz clock | | ||
| 2 HW breakpoints | 8 HW breakpoints | | ||
| no Ethernet core | Xilinx EthernetLite Ethernet core | | ||
| 1-way icache | 4-way icache | | ||
| no ITIM | ITIM at 0x0800\_0000 | | ||
| 16 kB DTIM | 64 kB DTIM | | ||
| no perf counters | 2 perf counters, hpmcounter3 and hpmcounter4 | | ||
| no CLICs | 3 CLICs (BTN0, BTN1 and BTN2) | | ||
|
||
Like the Freedom E300 Arty FPGA Dev Kit, the X300 is designed to be mapped onto | ||
an [Arty FPGA Evaluation | ||
Kit](https://www.xilinx.com/products/boards-and-kits/arty.html). | ||
|
||
### Bootrom | ||
|
||
The default bootrom consists of a program that immediately jumps to address | ||
0x20400000, which is 0x00400000 bytes into the SPI flash memory on the Arty | ||
board. | ||
|
||
## Requirements | ||
|
||
### Vivado 2017.1 (or later) | ||
|
||
You'll need Vivado to synthesize the bistream for the Arty FPGA. You should | ||
have received a single node license and instructions how to install Vivado with | ||
your Arty FPGA Dev Kit. | ||
|
||
### RISC-V Toolchain | ||
|
||
To compile the bootloader for the X300, the RISC-V software toolchain must be | ||
installed locally and the $(RISCV) environment variable must point to the | ||
location of where the RISC-V toolchains are installed. We recommend you build | ||
the toolchain yourself from | ||
[riscv/riscv-gnu-toolchain](https://github.com/riscv/riscv-gnu-toolchain/tree/411d1345507e5313c3575720f128be9e6c0ed941) | ||
|
||
Run the following commands to clone the repository and get started: | ||
|
||
```sh | ||
$ git clone https://github.com/hex-five/multizone-fpga.git | ||
$ cd multizone-fpga | ||
$ git submodule update --init --recursive | ||
``` | ||
|
||
## Building | ||
|
||
To compile the bistream, run | ||
|
||
```sh | ||
$ make -f Makefile.x300artydevkit mcs | ||
``` | ||
|
||
These will place the files under `builds/x300artydevkit/obj`. | ||
|
||
Note that in order to run the `mcs` target, you need to have the `vivado` | ||
executable on your `PATH`. | ||
|
||
## Running | ||
|
||
For instructions for getting the generated image onto an FPGA and programming | ||
it with software using the [Freedom E | ||
SDK](https://github.com/sifive/freedom-e-sdk), please see the [Freedom E310 | ||
Arty FPGA Dev Kit Getting Started | ||
Guide](https://www.sifive.com/documentation/freedom-soc/freedom-e300-arty-fpga-dev-kit-getting-started-guide/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
fpga-shells/src/main/scala/devices/xilinx/xilinxethernetlite/XilinxEthernetLite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// See LICENSE for license details. | ||
// Copyright (C) 2018-2019 Hex-Five | ||
package sifive.fpgashells.devices.xilinx.xilinxethernetlite | ||
|
||
import Chisel._ | ||
import freechips.rocketchip.amba.axi4._ | ||
import freechips.rocketchip.config.Parameters | ||
import freechips.rocketchip.diplomacy._ | ||
import freechips.rocketchip.tilelink._ | ||
import freechips.rocketchip.interrupts._ | ||
import freechips.rocketchip.subsystem.{CrossesToOnlyOneClockDomain, CacheBlockBytes} | ||
import sifive.fpgashells.ip.xilinx.ethernetlite.{EthernetLite, PhyPort, MdioPort} | ||
|
||
class XilinxEthernetLite(implicit p: Parameters, val crossing: ClockCrossingType = NoCrossing) | ||
extends LazyModule with CrossesToOnlyOneClockDomain | ||
{ | ||
val ethernetlite = LazyModule(new EthernetLite) | ||
|
||
val slave: TLInwardNode = | ||
(ethernetlite.slave | ||
:= AXI4Buffer() | ||
:= AXI4UserYanker() | ||
:= AXI4Deinterleaver(p(CacheBlockBytes)) | ||
:= AXI4IdIndexer(idBits=1) | ||
:= TLToAXI4(adapterName = Some("ethernetlite"))) | ||
|
||
val intnode: IntOutwardNode = ethernetlite.intnode | ||
|
||
lazy val module = new LazyModuleImp(this) { | ||
val io = IO(new Bundle { | ||
val port = new Bundle with PhyPort | ||
with MdioPort { | ||
} | ||
}) | ||
|
||
ethernetlite.module.io.clockreset.s_axi_aclk := clock | ||
ethernetlite.module.io.clockreset.s_axi_aresetn := ~reset | ||
|
||
io.port <> ethernetlite.module.io.port | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...shells/src/main/scala/devices/xilinx/xilinxethernetlite/XilinxEthernetLitePeriphery.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// See LICENSE for license details. | ||
// Copyright (C) 2018-2019 Hex-Five | ||
package sifive.fpgashells.devices.xilinx.xilinxethernetlite | ||
|
||
import Chisel._ | ||
import freechips.rocketchip.diplomacy.{LazyModule, LazyModuleImp, BufferParams} | ||
import freechips.rocketchip.subsystem.BaseSubsystem | ||
import freechips.rocketchip.tilelink._ | ||
import freechips.rocketchip.interrupts.IntSyncCrossingSink | ||
|
||
import sifive.fpgashells.ip.xilinx.ethernetlite.{PhyPort, MdioPort} | ||
|
||
trait HasSystemXilinxEthernetLite { this: BaseSubsystem => | ||
val xilinxethernetlite = LazyModule(new XilinxEthernetLite) | ||
private val cname = "xilinxethernetlite" | ||
sbus.coupleTo(s"slave_named_$cname") { xilinxethernetlite.crossTLIn(xilinxethernetlite.slave) :*= TLWidthWidget(sbus.beatBytes) :*= _ } | ||
ibus.fromSync := xilinxethernetlite.crossIntOut(xilinxethernetlite.intnode) | ||
} | ||
|
||
trait HasSystemXilinxEthernetLiteModuleImp extends LazyModuleImp { | ||
val outer: HasSystemXilinxEthernetLite | ||
val phy = IO(new Bundle with PhyPort with MdioPort {}) | ||
|
||
phy <> outer.xilinxethernetlite.module.io.port | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.