This repository has been archived by the owner on Jun 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
oh lordy he comin'. (SimTop/SimPlatform, res clock optional.)
- Loading branch information
Showing
8 changed files
with
122 additions
and
73 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
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
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
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,45 @@ | ||
package ee.hrzn.chryse.platform | ||
|
||
import chisel3._ | ||
import ee.hrzn.chryse.platform.PlatformBoard | ||
import ee.hrzn.chryse.platform.PlatformBoardResources | ||
import ee.hrzn.chryse.platform.resource | ||
|
||
final case class SimPlatform() extends PlatformBoard[SimPlatformResources] { | ||
val id = "sim" | ||
val clockHz = 1_000_000 | ||
|
||
val nextpnrBinary = "xxx" | ||
val nextpnrArgs = Seq() | ||
val packBinary = "xxx" | ||
val programBinary = "xxx" | ||
|
||
val resources = new SimPlatformResources | ||
|
||
override def apply[Top <: Module](genTop: => Top) = { | ||
resources.setNames() | ||
new SimTop(this, genTop) | ||
} | ||
} | ||
|
||
class SimPlatformResources extends PlatformBoardResources { | ||
val ubtn = resource.Button().inverted.onPin("B2") | ||
|
||
val uart = resource.UART().onPins(rx = "C3", tx = "D4") | ||
|
||
val ledg = resource.LED().inverted.onPin("E5") | ||
val ledr = resource.LED().inverted.onPin("F6") | ||
val led3 = resource.LED().inverted.onPin("G7") | ||
|
||
val pmod = resource.Connector( | ||
resource.InOut(), | ||
1 -> "H8", | ||
2 -> "I9", | ||
3 -> "J10", | ||
4 -> "K11", | ||
7 -> "L12", | ||
8 -> "M13", | ||
9 -> "N14", | ||
10 -> "O15", | ||
) | ||
} |
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,17 @@ | ||
package ee.hrzn.chryse.platform | ||
|
||
import chisel3._ | ||
import ee.hrzn.chryse.platform.PlatformBoard | ||
import ee.hrzn.chryse.platform.PlatformBoardResources | ||
import ee.hrzn.chryse.platform.resource | ||
|
||
class SimTop[Top <: Module]( | ||
platform: PlatformBoard[_ <: PlatformBoardResources], | ||
genTop: => Top, | ||
) extends Module | ||
with ChryseTop { | ||
private val top = Module(genTop) | ||
|
||
val connectedResources = | ||
connectResources(platform, None) | ||
} |