CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 03:36:20 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=0b87b38bc6ceee71fa245832c421d2a568b9c6d32f49748af57b6c36646bf450a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22TSp3DRFKnaM-O-OTduYEOah6E3auvKn_%22%3B%7D; HttpOnly; Path=/
cf-ray: 98cb50041e231ec2-BLR
SpinalHDL AXI crossbar with 2 SRAM's - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package vexriscv.demo
- import spinal.core._
- import spinal.lib._
- import spinal.lib.bus.amba3.apb._
- import spinal.lib.bus.amba4.axi._
- import spinal.lib.misc.HexTools
- import scala.collection.mutable.ArrayBuffer
- import scala.collection.Seq
- class TinyClunx(
- onChipRamSize : BigInt
- ) extends Component{
- val axiConfig = Axi4Config(
- addressWidth = 17,
- dataWidth = 64,
- idWidth = 3,
- useRegion = false,
- useLock = false,
- useQos = false,
- useResp = false,
- useProt=false,
- useStrb=false
- )
- val debug = true
- val io = new Bundle{
- //Clocks / reset
- val axiReset = in Bool()
- val axiClk = in Bool()
- val axiM1 = slave(Axi4(axiConfig))
- val axiM2 = slave(Axi4(axiConfig))
- //val axiM1 = slave(Axi4Shared(axiConfig))
- //val axiM2 = slave(Axi4Shared(axiConfig))
- }
- val axiClockDomain = ClockDomain(
- clock = io.axiClk,
- reset = io.axiReset
- )
- val axi1 = new ClockingArea(axiClockDomain) {
- val ram1 = Axi4SharedOnChipRam(
- dataWidth = 64,
- byteCount = onChipRamSize,
- idWidth = axiConfig.idWidth+1
- )
- val ram2 = Axi4SharedOnChipRam(
- dataWidth = 64,
- byteCount = onChipRamSize,
- idWidth = axiConfig.idWidth+1
- )
- val axiCrossbar = Axi4CrossbarFactory()
- axiCrossbar.addSlaves(
- ram1.io.axi -> (0x00000000L, onChipRamSize),
- ram2.io.axi -> (0x00010000L, onChipRamSize)
- )
- axiCrossbar.addConnections(
- io.axiM2 -> List(ram1.io.axi, ram2.io.axi),
- io.axiM1 -> List(ram1.io.axi, ram2.io.axi)
- )
- axiCrossbar.build()
- }
- }
- object TinyClunx{
- def main(args: Array[String]) {
- val config = SpinalConfig()
- config.generateVerilog({
- val toplevel = new TinyClunx(onChipRamSize = 8 kB)
- toplevel
- })
- }
- }
- // With memory init
- object TinyCClunxWithMemoryInit{
- def main(args: Array[String]) {
- val config = SpinalConfig()
- config.generateVerilog({
- val toplevel = new TinyClunx(onChipRamSize = 8 kB)
- HexTools.initRam(toplevel.axi1.ram1.ram, "src/main/ressource/hex/muraxDemo.hex", 0x80000000l)
- toplevel
- })
- }
- }
Tags:
spinalhdl
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ X
JavaScript | 2 sec ago | 0.24 KB
-
⭐⭐⭐Crypto Accounts⭐⭐
Java | 5 sec ago | 0.10 KB
-
✅⭐ Make huge profits on trading ⭐⭐ D
JavaScript | 6 sec ago | 0.24 KB
-
⭐⭐⭐GMAIL Logs (2FA disabled)⭐⭐
Java | 16 sec ago | 0.10 KB
-
⭐✅ MAKE $2500 IN 15 MIN⭐⭐⭐ G
JavaScript | 19 sec ago | 0.24 KB
-
⭐⭐⭐MAKE $9OO INSTANTLY D G⭐⭐
Java | 28 sec ago | 0.10 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ B
JavaScript | 31 sec ago | 0.24 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ W
JavaScript | 33 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand