-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Bare Metal VCU118 Capability #1892
Draft
BMorgan1296
wants to merge
4
commits into
ucb-bar:main
Choose a base branch
from
BMorgan1296:issue-1889-vcu118-bare-metal
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
367bbdb
Added new configs and harness binders for the VCU118 to use the UART …
BMorgan1296 99421ec
Merge branch 'main' into issue-1889-vcu118-bare-metal
BMorgan1296 1ea8646
Added support for LEDs in HarnessBinders.scala
BMorgan1296 18d3b95
Added LEDs for the TSI port. Could rework this to put the first 3 LED…
BMorgan1296 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -6,9 +6,12 @@ import chisel3.experimental.{BaseModule} | |
import org.chipsalliance.diplomacy.nodes.{HeterogeneousBag} | ||
import freechips.rocketchip.tilelink.{TLBundle} | ||
|
||
import sifive.blocks.devices.uart.{UARTPortIO} | ||
import sifive.fpgashells.shell._ | ||
import sifive.blocks.devices.uart.{HasPeripheryUARTModuleImp, UARTPortIO, UARTParams} | ||
import sifive.blocks.devices.spi.{HasPeripherySPI, SPIPortIO} | ||
|
||
import freechips.rocketchip.diplomacy.{LazyRawModuleImp} | ||
|
||
import chipyard._ | ||
import chipyard.harness._ | ||
import chipyard.iobinders._ | ||
|
@@ -37,6 +40,32 @@ class WithDDRMem extends HarnessBinder({ | |
} | ||
}) | ||
|
||
//Bare Metal Extension | ||
class WithVCU118UARTTSI extends HarnessBinder({ | ||
case (th: HasHarnessInstantiators, port: UARTTSIPort, chipId: Int) => { | ||
val rawModule = th.asInstanceOf[LazyRawModuleImp].wrapper.asInstanceOf[VCU118FPGATestHarness] | ||
val harnessIO = IO(new UARTPortIO(port.io.uartParams)).suggestName("uart_tsi") | ||
harnessIO <> port.io.uart | ||
val packagePinsWithPackageIOs = Seq( | ||
("AW25" , IOPin(harnessIO.rxd)), | ||
("BB21", IOPin(harnessIO.txd))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Your comment indicates that this overlaps with the UART device, which uses the UARTOverlay-generated pins in the VCU118TestHarness, but this generates its own pins. Do these overlap with the UARTOverlay pins? |
||
packagePinsWithPackageIOs foreach { case (pin, io) => { | ||
rawModule.xdc.addPackagePin(io, pin) | ||
rawModule.xdc.addIOStandard(io, "LVCMOS18") | ||
rawModule.xdc.addIOB(io) | ||
} } | ||
|
||
rawModule.all_leds(0) := port.io.dropped | ||
rawModule.all_leds(1) := port.io.dropped | ||
rawModule.all_leds(2) := port.io.dropped | ||
rawModule.all_leds(3) := port.io.dropped | ||
rawModule.all_leds(4) := port.io.tsi2tl_state(0) | ||
rawModule.all_leds(5) := port.io.tsi2tl_state(1) | ||
rawModule.all_leds(6) := port.io.tsi2tl_state(2) | ||
rawModule.all_leds(7) := port.io.tsi2tl_state(3) | ||
} | ||
}) | ||
|
||
class WithJTAG extends HarnessBinder({ | ||
case (th: VCU118FPGATestHarnessImp, port: JTAGPort, chipId: Int) => { | ||
val jtag_io = th.vcu118Outer.jtagPlacedOverlay.overlayOutput.jtag.getWrappedValue | ||
|
@@ -47,6 +76,5 @@ class WithJTAG extends HarnessBinder({ | |
jtag_io.TDO.driven := true.B | ||
// ignore srst_n | ||
jtag_io.srst_n := DontCare | ||
|
||
} | ||
}) |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we drop the "BareMetal" naming, and name it
UARTTSIVCU118
in all places. The "baremetal" terminology I feel does not accurately describe what the additional capability of these configs is.