├── .ciignore ├── .ctags ├── .ctagsignore ├── .githooks └── ignore-certain-dirs-commit-msg ├── .gitignore ├── .gitmodules ├── .java_tmp └── .gitignore ├── .mergify.yml ├── .readthedocs.yml ├── CHANGELOG.CEP.md ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.Chipyard.md ├── LICENSE.Components.md ├── LICENSE.SiFive.md ├── LICENSE.md ├── README.Chipyard.md ├── README.md ├── build.sbt.nonasic ├── cep_docs ├── cep_architecture.jpg ├── cep_logo.jpg └── related_logos.jpg ├── cep_sort.f ├── citation.cff ├── common.mk ├── dockerfiles ├── Dockerfile └── README.md ├── docs ├── Advanced-Concepts │ ├── Debugging-RTL.rst │ ├── Managing-Published-Scala-Dependencies.rst │ └── index.rst ├── Chipyard-Basics │ ├── Chipyard-Components.rst │ └── Initial-Repo-Setup.rst ├── Customization │ └── Heterogeneous-SoCs.rst ├── Generators │ ├── Gemmini.rst │ ├── Ibex.rst │ ├── SHA3.rst │ ├── SiFive-Generators.rst │ ├── fft.rst │ └── index.rst ├── Prototyping │ └── VCU118.rst ├── Software │ └── index.rst ├── TileLink-Diplomacy-Reference │ └── Widgets.rst ├── VLSI │ ├── ASAP7-Tutorial.rst │ ├── Advanced-Usage.rst │ ├── Basic-Flow.rst │ ├── Building-A-Chip.rst │ ├── Sky130-Tutorial.rst │ └── index.rst ├── conf.py └── index.rst ├── fpga ├── .gitignore ├── Makefile ├── program_arty100t_flash.sh ├── program_arty100t_flash.tcl ├── program_arty100t_jtag.sh ├── program_arty100t_jtag.tcl ├── program_vc707_flash.sh ├── program_vc707_flash.tcl ├── program_vc707_jtag.sh ├── program_vc707_jtag.tcl ├── program_vcu118_flash.sh ├── program_vcu118_flash.tcl ├── program_vcu118_jtag.sh ├── program_vcu118_jtag.tcl ├── scripts │ ├── create_project.tcl │ ├── generate_vcs_collateral.tcl │ ├── run_impl_bitstream.tcl │ └── vcu118_program.tcl └── src │ └── main │ ├── resources │ ├── arty100t │ │ ├── cep_sdboot │ │ │ ├── Makefile │ │ │ ├── head.S │ │ │ ├── include │ │ │ │ ├── bits.h │ │ │ │ ├── const.h │ │ │ │ ├── devices │ │ │ │ │ ├── cepregs.h │ │ │ │ │ ├── clint.h │ │ │ │ │ ├── gpio.h │ │ │ │ │ ├── plic.h │ │ │ │ │ ├── spi.h │ │ │ │ │ └── uart.h │ │ │ │ ├── encoding.h │ │ │ │ ├── kprintf.h │ │ │ │ ├── platform.h │ │ │ │ ├── sections.h │ │ │ │ ├── smp.h │ │ │ │ └── util.h │ │ │ ├── kprintf.c │ │ │ ├── sdboot.elf.lds │ │ │ └── syscalls_bootrom.c │ │ └── sdboot │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── common.h │ │ │ ├── head.S │ │ │ ├── include │ │ │ ├── bits.h │ │ │ ├── const.h │ │ │ ├── devices │ │ │ │ ├── cepregs.h │ │ │ │ ├── clint.h │ │ │ │ ├── gpio.h │ │ │ │ ├── plic.h │ │ │ │ ├── spi.h │ │ │ │ └── uart.h │ │ │ ├── platform.h │ │ │ ├── sections.h │ │ │ └── smp.h │ │ │ ├── kprintf.c │ │ │ ├── kprintf.h │ │ │ ├── linker │ │ │ ├── memory.lds │ │ │ └── sdboot.elf.lds │ │ │ └── sd.c │ ├── vc707 │ │ └── cep_sdboot │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── head.S │ │ │ ├── include │ │ │ ├── bits.h │ │ │ ├── const.h │ │ │ ├── devices │ │ │ │ ├── cepregs.h │ │ │ │ ├── clint.h │ │ │ │ ├── gpio.h │ │ │ │ ├── plic.h │ │ │ │ ├── spi.h │ │ │ │ └── uart.h │ │ │ ├── encoding.h │ │ │ ├── kprintf.h │ │ │ ├── platform.h │ │ │ ├── sections.h │ │ │ ├── smp.h │ │ │ └── util.h │ │ │ ├── kprintf.c │ │ │ ├── sdboot.elf.lds │ │ │ └── syscalls_bootrom.c │ └── vcu118 │ │ ├── cep_sdboot │ │ ├── Makefile │ │ ├── head.S │ │ ├── include │ │ │ ├── bits.h │ │ │ ├── const.h │ │ │ ├── devices │ │ │ │ ├── cepregs.h │ │ │ │ ├── clint.h │ │ │ │ ├── gpio.h │ │ │ │ ├── plic.h │ │ │ │ ├── spi.h │ │ │ │ └── uart.h │ │ │ ├── encoding.h │ │ │ ├── kprintf.h │ │ │ ├── platform.h │ │ │ ├── sections.h │ │ │ ├── smp.h │ │ │ └── util.h │ │ ├── kprintf.c │ │ ├── sdboot.elf.lds │ │ └── syscalls_bootrom.c │ │ └── sdboot │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── common.h │ │ ├── head.S │ │ ├── include │ │ ├── bits.h │ │ ├── const.h │ │ ├── devices │ │ │ ├── clint.h │ │ │ ├── gpio.h │ │ │ ├── plic.h │ │ │ ├── spi.h │ │ │ └── uart.h │ │ ├── platform.h │ │ ├── sections.h │ │ └── smp.h │ │ ├── kprintf.c │ │ ├── kprintf.h │ │ ├── linker │ │ ├── memory.lds │ │ └── sdboot.elf.lds │ │ └── sd.c │ └── scala │ ├── arty │ ├── Configs.scala │ ├── HarnessBinders.scala │ ├── IOBinders.scala │ └── TestHarness.scala │ ├── arty100t │ ├── Configs.scala │ ├── CustomOverlays.scala │ ├── GPIOs.scala │ ├── HarnessBinders.scala │ ├── IOBinders.scala │ └── TestHarness.scala │ ├── vc707 │ ├── Configs.scala │ ├── CustomOverlays.scala │ ├── GPIOs.scala │ ├── HarnessBinders.scala │ ├── IOBinders.scala │ └── TestHarness.scala │ └── vcu118 │ ├── Configs.scala │ ├── CustomOverlays.scala │ ├── FMCUtil.scala │ ├── GPIOs.scala │ ├── HarnessBinders.scala │ ├── IOBinders.scala │ └── TestHarness.scala ├── generators ├── chipyard │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── csrc │ │ │ │ └── emulator.cc │ │ │ └── vsrc │ │ │ │ ├── Arty100TTestDriver.v │ │ │ │ ├── ArtyTestDriver.v │ │ │ │ ├── ClockDividerN.sv │ │ │ │ ├── GCDMMIOBlackBox.v │ │ │ │ └── pll_wrapper.sv │ │ └── scala │ │ │ ├── ChipTop.scala │ │ │ ├── CustomBusTopologies.scala │ │ │ ├── DigitalTop.scala.nonasic │ │ │ ├── Generator.scala │ │ │ ├── HarnessBinders.scala │ │ │ ├── IOBinders.scala.nonasic │ │ │ ├── Subsystem.scala │ │ │ ├── System.scala.nonasic │ │ │ ├── TestHarness.scala │ │ │ ├── TestSuites.scala │ │ │ ├── Util.scala │ │ │ ├── clocking │ │ │ ├── ClockDividerN.scala │ │ │ ├── ClockGroupCombiner.scala │ │ │ ├── ClockGroupNamePrefixer.scala │ │ │ ├── DividerOnlyClockGenerator.scala │ │ │ ├── HasChipyardPRCI.scala │ │ │ ├── TileClockGater.scala │ │ │ └── TileResetSetter.scala │ │ │ ├── config │ │ │ ├── AbstractCEPConfig.scala │ │ │ ├── AbstractConfig.scala │ │ │ ├── BoomConfigs.scala │ │ │ ├── CEPConfigs.scala │ │ │ ├── CVA6Configs.scala │ │ │ ├── HeteroConfigs.scala │ │ │ ├── IbexConfigs.scala │ │ │ ├── RocketConfigs.scala │ │ │ ├── RocketSha3Configs.scala │ │ │ ├── SodorConfigs.scala │ │ │ ├── TracegenConfigs.scala │ │ │ ├── TutorialConfigs.scala │ │ │ └── fragments │ │ │ │ ├── CEPConfigFragments.scala │ │ │ │ ├── ClockingFragments.scala │ │ │ │ ├── PeripheralFragments.scala │ │ │ │ ├── RoCCFragments.scala │ │ │ │ ├── SubsystemFragments.scala │ │ │ │ ├── TileFragments.scala │ │ │ │ └── TracegenFragments.scala │ │ │ ├── example │ │ │ ├── GCD.scala │ │ │ ├── InitZero.scala │ │ │ ├── NodeTypes.scala │ │ │ ├── RegisterNodeExample.scala │ │ │ ├── TutorialTile.scala │ │ │ └── dsptools │ │ │ │ ├── DspBlocks.scala │ │ │ │ ├── GenericFIR.scala │ │ │ │ └── StreamingPassthrough.scala │ │ │ ├── stage │ │ │ ├── ChipyardAnnotations.scala │ │ │ ├── ChipyardCli.scala │ │ │ ├── ChipyardStage.scala │ │ │ └── phases │ │ │ │ ├── AddDefaultTests.scala │ │ │ │ └── GenerateTestSuiteMakefrags.scala │ │ │ └── unittest │ │ │ ├── TestHarness.scala │ │ │ └── UnitTestSuite.scala │ │ └── test │ │ └── scala │ │ └── clocking │ │ └── SimplePllConfigurationSpec.scala ├── firechip │ └── src │ │ ├── main │ │ └── scala │ │ │ ├── BridgeBinders.scala │ │ │ ├── FireSim.scala │ │ │ ├── TargetConfigs.scala │ │ │ └── TargetLandTestSuites.scala │ │ └── test │ │ └── scala │ │ └── ScalaTestSuite.scala ├── mitll-blocks │ └── src │ │ └── main │ │ ├── resources │ │ └── vsrc │ │ │ ├── aeees │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── aeees.py │ │ │ ├── aeees_emu.py │ │ │ ├── aeees_gen.py │ │ │ └── aeees_wb_gen.py │ │ │ ├── aes │ │ │ ├── aes.pdf │ │ │ ├── aes_128.v │ │ │ ├── aes_192.v │ │ │ ├── aes_192_mock_tss.sv │ │ │ ├── round.v │ │ │ └── table.v │ │ │ ├── auto-fir │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── amnesia.py │ │ │ ├── auto-fir.py │ │ │ └── filter_tb.v │ │ │ ├── des3 │ │ │ ├── README.txt │ │ │ ├── crp.v │ │ │ ├── des3.v │ │ │ ├── des3_mock_tss.sv │ │ │ ├── key_sel3.v │ │ │ ├── sbox1.v │ │ │ ├── sbox2.v │ │ │ ├── sbox3.v │ │ │ ├── sbox4.v │ │ │ ├── sbox5.v │ │ │ ├── sbox6.v │ │ │ ├── sbox7.v │ │ │ └── sbox8.v │ │ │ ├── dsp │ │ │ ├── FIR_filter.v │ │ │ ├── FIR_filter_mock_tss.sv │ │ │ ├── IIR_filter.v │ │ │ ├── IIR_filter_mock_tss.sv │ │ │ ├── README.md │ │ │ ├── dft_top_mock_tss.sv │ │ │ └── idft_top_mock_tss.sv │ │ │ ├── generated_dsp_code │ │ │ └── .gitignore │ │ │ ├── gps │ │ │ ├── README.md │ │ │ ├── cacode.v │ │ │ ├── gps.v │ │ │ ├── gps_mock_tss.sv │ │ │ └── pcode.v │ │ │ ├── llki │ │ │ ├── llki_pkg.sv │ │ │ ├── llki_pp_wrapper.sv │ │ │ ├── mock_tss_fsm.sv │ │ │ ├── prim_generic_ram_1p.sv │ │ │ ├── scratchpad_wrapper.sv │ │ │ ├── srot_wrapper.sv │ │ │ ├── tlul_adapter_reg.sv │ │ │ ├── tlul_err.sv │ │ │ ├── tlul_fifo_sync.sv │ │ │ └── top_pkg.sv │ │ │ ├── md5 │ │ │ ├── md5.v │ │ │ ├── md5_mock_tss.sv │ │ │ ├── pancham.v │ │ │ └── pancham_round.v │ │ │ ├── opentitan │ │ │ ├── rsa │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── example.txt │ │ │ ├── pem │ │ │ │ ├── prikey.h │ │ │ │ ├── prikey.pem │ │ │ │ ├── prikey1.pem │ │ │ │ ├── prikey2.pem │ │ │ │ ├── prikey3.pem │ │ │ │ ├── prikey4.pem │ │ │ │ ├── pubkey.h │ │ │ │ ├── pubkey.pem │ │ │ │ ├── pubkey1.pem │ │ │ │ ├── pubkey2.pem │ │ │ │ ├── pubkey3.pem │ │ │ │ └── pubkey4.pem │ │ │ ├── rtl │ │ │ │ ├── adder.v │ │ │ │ ├── blockmem1r1w.v │ │ │ │ ├── blockmem2r1w.v │ │ │ │ ├── blockmem2r1wptr.v │ │ │ │ ├── blockmem2rptr1w.v │ │ │ │ ├── modexp.v │ │ │ │ ├── modexp_core.v │ │ │ │ ├── modexp_core_mock_tss.sv │ │ │ │ ├── montprod.v │ │ │ │ ├── residue.v │ │ │ │ ├── shl.v │ │ │ │ └── shr.v │ │ │ ├── src │ │ │ │ ├── RSA.h │ │ │ │ ├── ascii2hex.c │ │ │ │ ├── ascii2hex.h │ │ │ │ ├── define.h │ │ │ │ ├── extKeys.c │ │ │ │ ├── extKeys.h │ │ │ │ ├── file.c │ │ │ │ ├── file.h │ │ │ │ ├── hex2ascii.c │ │ │ │ ├── hex2ascii.h │ │ │ │ └── input.h │ │ │ ├── tb_modexp.cpp │ │ │ ├── tb_modexp.v │ │ │ ├── tb_modexp_orig.v │ │ │ ├── tb_sys.cpp │ │ │ ├── tb_top.cpp │ │ │ ├── tb_top.v │ │ │ └── test │ │ │ │ ├── exp │ │ │ │ ├── mod │ │ │ │ ├── msg │ │ │ │ └── res │ │ │ ├── sha256 │ │ │ ├── sha256.v │ │ │ ├── sha256_k_constants.v │ │ │ ├── sha256_mock_tss.sv │ │ │ └── sha256_w_mem.v │ │ │ └── shaaa │ │ │ ├── README.md │ │ │ ├── shaaa.py │ │ │ ├── shaaa_verilog_gen.py │ │ │ └── templates │ │ │ ├── shaaa.vt │ │ │ ├── shaaa_k_constants.vt │ │ │ ├── shaaa_mock_tss.svt │ │ │ ├── shaaa_stimulus.vt │ │ │ ├── shaaa_tb.svt │ │ │ └── shaaa_w_mem.vt │ │ └── scala │ │ ├── aes.scala │ │ ├── cep_addresses.scala │ │ ├── cep_registers.scala │ │ ├── cep_scratchpad.scala │ │ ├── des3.scala │ │ ├── dft.scala │ │ ├── fir.scala │ │ ├── gps.scala │ │ ├── idft.scala │ │ ├── iir.scala │ │ ├── md5.scala │ │ ├── rsa.scala │ │ ├── sha256.scala │ │ └── srot.scala └── tracegen │ ├── src │ └── main │ │ └── scala │ │ ├── Configs.scala │ │ ├── System.scala │ │ └── Tile.scala │ └── tracegen.mk ├── gitSubmoduleExport.csv ├── project ├── build.properties └── plugins.sbt ├── scripts ├── add-githooks.sh ├── build-openocd.sh ├── build-toolchains.sh ├── build-util.sh ├── centos-req.sh ├── check-tracegen.sh ├── entrypoint.sh ├── firesim-setup.sh ├── gen-tags.sh ├── init-fpga.sh ├── init-software.sh ├── init-submodules-no-riscv-tools-nolog.sh ├── init-submodules-no-riscv-tools.sh ├── init-vlsi.sh ├── insert-includes.py ├── manage-submodules.py ├── numa_prefix ├── repo-clean.sh ├── smartelf2hex.sh ├── sort-blackbox.py ├── tutorial-patches │ └── build.sbt.patch ├── tutorial-setup.sh └── ubuntu-req.sh ├── sims ├── cep_cosim │ ├── .gitignore │ ├── Makefile │ ├── Makefile.chipyard │ ├── README.md │ ├── bin │ │ ├── convert-bootrom.py │ │ ├── createPassFail.pl │ │ ├── generate-isa-vsif.py │ │ ├── v2c.pl │ │ └── vpp.pl │ ├── bootrom │ │ ├── Makefile │ │ ├── cep_boot.lds │ │ ├── head.S │ │ ├── include │ │ │ ├── bits.h │ │ │ ├── const.h │ │ │ ├── devices │ │ │ │ ├── cepregs.h │ │ │ │ ├── clint.h │ │ │ │ ├── gpio.h │ │ │ │ ├── plic.h │ │ │ │ ├── spi.h │ │ │ │ └── uart.h │ │ │ ├── encoding.h │ │ │ ├── kprintf.h │ │ │ ├── platform.h │ │ │ ├── sections.h │ │ │ ├── smp.h │ │ │ └── util.h │ │ ├── kprintf.c │ │ ├── sd.c │ │ └── syscalls_bootrom.c │ ├── cep_buildHW.make │ ├── cep_buildSW.make │ ├── common.make │ ├── comp.do │ ├── drivers │ │ ├── bare │ │ │ ├── bare_malloc.c │ │ │ ├── cep_link.lds │ │ │ ├── crt.S │ │ │ ├── include │ │ │ │ ├── bare_malloc.h │ │ │ │ ├── compiler.h │ │ │ │ ├── const.h │ │ │ │ ├── devices │ │ │ │ │ ├── arty100t_gpio.h │ │ │ │ │ ├── cepregs.h │ │ │ │ │ ├── clint.h │ │ │ │ │ ├── gpio.h │ │ │ │ │ ├── plic.h │ │ │ │ │ ├── spi.h │ │ │ │ │ └── uart.h │ │ │ │ ├── encoding.h │ │ │ │ ├── kprintf.h │ │ │ │ ├── mmio.h │ │ │ │ ├── platform.h │ │ │ │ └── util.h │ │ │ ├── kprintf.c │ │ │ └── syscalls.c │ │ ├── cep_tests │ │ │ ├── CEP.h │ │ │ ├── Config.in │ │ │ ├── cep_aes.cc │ │ │ ├── cep_aes.h │ │ │ ├── cep_apis.cc │ │ │ ├── cep_apis.h │ │ │ ├── cep_crypto.cc │ │ │ ├── cep_crypto.h │ │ │ ├── cep_des3.cc │ │ │ ├── cep_des3.h │ │ │ ├── cep_dft.cc │ │ │ ├── cep_dft.h │ │ │ ├── cep_fir.cc │ │ │ ├── cep_fir.h │ │ │ ├── cep_gps.cc │ │ │ ├── cep_gps.h │ │ │ ├── cep_idft.cc │ │ │ ├── cep_idft.h │ │ │ ├── cep_iir.cc │ │ │ ├── cep_iir.h │ │ │ ├── cep_md5.cc │ │ │ ├── cep_md5.h │ │ │ ├── cep_riscv.cc │ │ │ ├── cep_riscv.h │ │ │ ├── cep_rsa.cc │ │ │ ├── cep_rsa.h │ │ │ ├── cep_sha256.cc │ │ │ ├── cep_sha256.h │ │ │ ├── cep_srot.cc │ │ │ ├── cep_srot.h │ │ │ ├── cep_srot_keys.h │ │ │ ├── fft.cc │ │ │ ├── fft.h │ │ │ ├── portable_io.cc │ │ │ └── portable_io.h │ │ ├── diag │ │ │ ├── cepAccessTest.cc │ │ │ ├── cepAccessTest.h │ │ │ ├── cepClintTest.cc │ │ │ ├── cepClintTest.h │ │ │ ├── cepCsrTest.cc │ │ │ ├── cepCsrTest.h │ │ │ ├── cepGpioTest.cc │ │ │ ├── cepGpioTest.h │ │ │ ├── cepLockTest.cc │ │ │ ├── cepLockTest.h │ │ │ ├── cepLockfreeAtomic.cc │ │ │ ├── cepLockfreeAtomic.h │ │ │ ├── cepMacroMix.cc │ │ │ ├── cepMacroMix.h │ │ │ ├── cepMaskromTest.cc │ │ │ ├── cepMaskromTest.h │ │ │ ├── cepMemTest.cc │ │ │ ├── cepMemTest.h │ │ │ ├── cepMultiThread.cc │ │ │ ├── cepMultiThread.h │ │ │ ├── cepPlicTest.cc │ │ │ ├── cepPlicTest.h │ │ │ ├── cepRegTest.cc │ │ │ ├── cepRegTest.h │ │ │ ├── cepSpiTest.cc │ │ │ ├── cepSpiTest.h │ │ │ ├── cepSrotMemTest.cc │ │ │ ├── cepSrotMemTest.h │ │ │ ├── cepSrotTest.cc │ │ │ ├── cepSrotTest.h │ │ │ ├── cepUartTest.cc │ │ │ ├── cepUartTest.h │ │ │ ├── memBaseTest.cc │ │ │ ├── memBaseTest.h │ │ │ ├── random48.cc │ │ │ ├── random48.h │ │ │ ├── regBaseTest.cc │ │ │ ├── regBaseTest.h │ │ │ ├── simdiag_global.cc │ │ │ └── simdiag_global.h │ │ ├── vectors │ │ │ ├── .NOT_EMPTY │ │ │ ├── AES_playback.h │ │ │ ├── DES3_playback.h │ │ │ ├── DFT_playback.h │ │ │ ├── FIR_playback.h │ │ │ ├── GPS_0_playback.h │ │ │ ├── GPS_1_playback.h │ │ │ ├── GPS_2_playback.h │ │ │ ├── GPS_3_playback.h │ │ │ ├── IDFT_playback.h │ │ │ ├── IIR_playback.h │ │ │ ├── MD5_playback.h │ │ │ ├── RSA_playback.h │ │ │ ├── SHA256_0_playback.h │ │ │ ├── SHA256_1_playback.h │ │ │ ├── SHA256_2_playback.h │ │ │ ├── SHA256_3_playback.h │ │ │ ├── SROT_aesonly_playback.h │ │ │ └── SROT_playback.h │ │ └── virtual │ │ │ ├── link.ld │ │ │ ├── multi_entry.S │ │ │ ├── multi_vm.c │ │ │ ├── riscv_test.h │ │ │ └── string.c │ ├── dvt │ │ ├── RocketTile_beh.sv │ │ ├── cep_adrMap.incl │ │ ├── cep_hierMap.incl │ │ ├── cep_tb.sv │ │ ├── cpu_driver.sv │ │ ├── dpi_common.incl │ │ ├── dump_control.incl │ │ ├── ptw_monitor.sv │ │ ├── sd_spi_model.v │ │ ├── spi_loopback.sv │ │ ├── system_driver.sv │ │ ├── tile_monitor.sv │ │ ├── tl_defines.incl │ │ ├── tl_master_beh.sv │ │ ├── tl_slave_beh.sv │ │ ├── uart_model.sv │ │ ├── uart_rx.v │ │ ├── v2c_cmds.incl │ │ └── v2c_top.incl │ ├── modelsim_coverage.do │ ├── pli │ │ ├── VecVal.h │ │ ├── dpi_bitbang.cc │ │ ├── dpi_bitbang.h │ │ ├── log.cc │ │ ├── log.h │ │ ├── v2c.tab │ │ ├── vpp2shMem.cc │ │ └── vpp2shMem.h │ ├── share │ │ ├── access.cc │ │ ├── access.h │ │ ├── sahandler.c │ │ ├── shIpc.cc │ │ ├── shIpc.h │ │ ├── shMem.cc │ │ ├── shMem.h │ │ └── share.h │ ├── simDiag │ │ ├── simPio.cc │ │ ├── simPio.h │ │ └── stdTypes.h │ ├── src │ │ ├── shLog.cc │ │ ├── shLog.h │ │ ├── shPthread.cc │ │ ├── shPthread.h │ │ ├── v2c_sys.cc │ │ └── v2c_sys.h │ └── testSuites │ │ ├── bareMetalTests │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── accessTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── aesMacro │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── atomicOps │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── cacheCoherence │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── clintIntr │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ ├── riscv_wrapper.cc │ │ │ └── riscv_wrapper.h │ │ ├── clintTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── common.make │ │ ├── csrTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── extIntr │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ ├── riscv_wrapper.cc │ │ │ └── riscv_wrapper.h │ │ ├── fullBoot │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── idcache_smc │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── lockTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── lockfreeAtomic │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── lrscOps │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── macro2Mix │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── macro3Mix │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── macro4Mix │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── macroMix │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── miscTests │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── multiLock │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── plicPrioIntr │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── plicTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── regTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ ├── srotMemTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ ├── c_module.h │ │ │ └── riscv_wrapper.cc │ │ └── suite_config.v │ │ ├── bfmTests │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── accessTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ └── c_module.h │ │ ├── clintTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ └── c_module.h │ │ ├── common.make │ │ ├── lockTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ └── c_module.h │ │ ├── macroMix │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ └── c_module.h │ │ ├── miscTests │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ └── c_module.h │ │ ├── multiLock │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ └── c_module.h │ │ ├── multiThread │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ └── c_module.h │ │ ├── plicPrioIntr │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ └── c_module.h │ │ ├── plicTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ └── c_module.h │ │ ├── regTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ └── c_module.h │ │ ├── scratchpadTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ └── c_module.h │ │ ├── srotBadKeys │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ └── c_module.h │ │ ├── srotErrorTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ └── c_module.h │ │ ├── srotKeyTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ └── c_module.h │ │ ├── srotMemTest │ │ │ ├── Makefile │ │ │ ├── c_dispatch.cc │ │ │ ├── c_dispatch.h │ │ │ ├── c_module.cc │ │ │ └── c_module.h │ │ └── suite_config.v │ │ └── isaTests │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── common.make │ │ ├── dtmTest │ │ ├── Makefile │ │ ├── c_dispatch.cc │ │ ├── c_dispatch.h │ │ ├── c_module.cc │ │ ├── c_module.h │ │ ├── dtm.cfg │ │ └── riscv_wrapper.cc │ │ ├── suite_config.v │ │ └── testTemplate │ │ ├── Makefile │ │ ├── c_dispatch.cc │ │ ├── c_dispatch.h │ │ ├── c_module.cc │ │ └── c_module.h ├── common-sim-flags.mk ├── vcs │ ├── .gitignore │ └── Makefile └── verilator │ ├── .gitignore │ └── Makefile ├── software ├── baremetal │ ├── gpiotest │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── crt.S │ │ ├── gpiotest.c │ │ ├── include │ │ │ ├── compiler.h │ │ │ ├── const.h │ │ │ ├── devices │ │ │ │ ├── arty100t_gpio.h │ │ │ │ ├── cepregs.h │ │ │ │ ├── clint.h │ │ │ │ ├── gpio.h │ │ │ │ ├── plic.h │ │ │ │ ├── spi.h │ │ │ │ ├── uart.h │ │ │ │ ├── vc707_gpio.h │ │ │ │ └── vcu118_gpio.h │ │ │ ├── encoding.h │ │ │ ├── kprintf.h │ │ │ ├── mmio.h │ │ │ ├── platform.h │ │ │ └── util.h │ │ ├── kprintf.c │ │ ├── link.ld │ │ └── syscalls.c │ └── hello_world │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── crt.S │ │ ├── hello_world.c │ │ ├── include │ │ ├── compiler.h │ │ ├── const.h │ │ ├── devices │ │ │ ├── arty100t_gpio.h │ │ │ ├── cepregs.h │ │ │ ├── clint.h │ │ │ ├── gpio.h │ │ │ ├── plic.h │ │ │ ├── spi.h │ │ │ └── uart.h │ │ ├── encoding.h │ │ ├── kprintf.h │ │ ├── mmio.h │ │ ├── platform.h │ │ └── util.h │ │ ├── kprintf.c │ │ ├── link.ld │ │ └── syscalls.c └── linux │ ├── Makefile │ ├── gpiotest │ ├── CMakeLists.txt │ ├── Config.in │ ├── gpiotest.c │ └── gpiotest.mk │ └── helloworld │ ├── CMakeLists.txt │ ├── Config.in │ ├── helloworld.c │ └── helloworld.mk ├── tests ├── .gitignore ├── Makefile ├── accum.c ├── big-blkdev.c ├── blkdev.c ├── blkdev.h ├── charcount.c ├── fft.c ├── gcd.c ├── htif.ld ├── libgloss.mk ├── mmio.h ├── nic-loopback.c ├── nic.h ├── nvdla.c ├── nvdla.h ├── pingd.c ├── pwm.c ├── rocc.h ├── spiflash.h ├── spiflash.py ├── spiflashread.c ├── spiflashwrite.c ├── streaming-fir.c └── streaming-passthrough.c ├── tools ├── dromajo │ └── dromajo.mk └── torture.mk ├── variables.mk ├── vcs.mk └── vlsi ├── .gitignore ├── Makefile ├── env.yml ├── example-asap7.yml ├── example-design.yml ├── example-nangate45.yml ├── example-openroad.yml ├── example-sky130.yml ├── example-tech.yml ├── example-tools.yml ├── example-vlsi ├── example-vlsi-sky130 ├── power.mk ├── sim.mk └── view_gds.py /.ciignore: -------------------------------------------------------------------------------- 1 | docs/* 2 | -------------------------------------------------------------------------------- /.ctagsignore: -------------------------------------------------------------------------------- 1 | */target 2 | sims 3 | toolchains 4 | -------------------------------------------------------------------------------- /.githooks/ignore-certain-dirs-commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [[ ! -a .ciignore ]]; then 4 | exit # If .ciignore doesn't exists, just quit this Git hook 5 | fi 6 | 7 | # Load in every file that will be changed via this commit into an array 8 | changes=( `git diff --name-only --cached` ) 9 | 10 | # Load the patterns we want to skip into an array 11 | mapfile -t blocklist < .ciignore 12 | 13 | for i in "${blocklist[@]}" 14 | do 15 | # Remove the current pattern from the list of changes 16 | changes=( ${changes[@]/$i/} ) 17 | 18 | if [[ ${#changes[@]} -eq 0 ]]; then 19 | # If we've exhausted the list of changes before we've finished going 20 | # through patterns, that's okay, just quit the loop 21 | break 22 | fi 23 | done 24 | 25 | if [[ ${#changes[@]} -gt 0 ]]; then 26 | # If there's still changes left, then we have stuff to build, leave the commit alone. 27 | exit 28 | fi 29 | 30 | # Prefix the commit message with "[skip ci]" 31 | sed -i '1s/^/[skip ci] /' "$1" 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bootrom/* 2 | docs/warnings.txt 3 | /Makefrag.pkgs 4 | target 5 | *.jar 6 | *.stamp 7 | *.vcd 8 | *.swp 9 | *.swo 10 | *.log 11 | *# 12 | *~ 13 | .idea 14 | .DS_Store 15 | env.sh 16 | riscv-tools-install 17 | esp-tools-install 18 | tags 19 | *~ 20 | env-riscv-tools.sh 21 | env-esp-tools.sh 22 | .bsp/ 23 | CHIPYARD_BUILD_INFO.make 24 | cep_version.h 25 | cep_adrMap.h 26 | v2c_cmds.h 27 | .PERSUITE* 28 | 29 | *.dump 30 | *.bin 31 | *.img 32 | *.elf 33 | *.o 34 | 35 | 36 | 37 | # The following exclusions ensure that ASIC-related files 38 | # do not get checked into the repository 39 | build.sbt 40 | /generators/chipyard/src/main/scala/DigitalTop.scala 41 | /generators/chipyard/src/main/scala/System.scala 42 | /generators/chipyard/src/main/scala/IOBinders.scala 43 | /generators/chipyard/src/main/scala/config/AbstractCEPASICConfig.scala 44 | /generators/chipyard/src/main/scala/config/CEPASICConfig.scala 45 | /generators/chipyard/src/main/scala/config/fragments/CEPASICConfigFragments.scala -------------------------------------------------------------------------------- /.java_tmp/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /.mergify.yml: -------------------------------------------------------------------------------- 1 | pull_request_rules: 2 | # For Chipyard version 1.x.y, here let x = minor, y = patch 3 | # Only support backporting to the last minor release branch. 4 | # This rule will need to be updated on minor releases. 5 | - name: backport to latest minor release 6 | conditions: 7 | - merged 8 | - base=main 9 | - label="Please Backport" 10 | actions: 11 | backport: 12 | branches: 13 | - 1.6.x 14 | ignore_conflicts: True 15 | label_conflicts: "bp-conflict" 16 | label: 17 | add: [Backported] 18 | 19 | - name: label Mergify backport PR 20 | conditions: 21 | - body~=This is an automated backport of pull request \#\d+ d 22 | actions: 23 | label: 24 | add: [Backport] 25 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | build: 4 | os: ubuntu-20.04 5 | tools: 6 | python: "3.6" 7 | 8 | formats: all 9 | 10 | sphinx: 11 | configuration: docs/conf.py 12 | 13 | python: 14 | install: 15 | - requirements: docs/requirements.txt 16 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing to Chipyard 2 | ============================= 3 | 4 | ### Branch management: 5 | 6 | 1) github:com/ucb-bar/chipyard: main = pre-release non-stable branch with latest features. All merges to main must go through PR. 7 | 2) github:com/ucb-bar/chipyard: specific tag / tagged branch = official chipyard release. 8 | 3) Other dependencies pointed at by Chipyard (e.g. firesim, boom): master/main should be the version submoduled in ucb-bar/chipyard main. 9 | -------------------------------------------------------------------------------- /cep_docs/cep_architecture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-ll/CEP/bcc812336910a095e6cb48a50ac123872fdac93f/cep_docs/cep_architecture.jpg -------------------------------------------------------------------------------- /cep_docs/cep_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-ll/CEP/bcc812336910a095e6cb48a50ac123872fdac93f/cep_docs/cep_logo.jpg -------------------------------------------------------------------------------- /cep_docs/related_logos.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-ll/CEP/bcc812336910a095e6cb48a50ac123872fdac93f/cep_docs/related_logos.jpg -------------------------------------------------------------------------------- /cep_sort.f: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2021 Massachusetts Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: cep_sort.f 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: Prioriterized Verilog package list used to sort 8 | // the Chipyard-generate file list in order to ensure 9 | // proper elaboration for simulation 10 | // Note: Used by the ./scripts/sort-blackbox.py script 11 | // 12 | //************************************************************************ 13 | llki_pkg.sv 14 | top_pkg.sv 15 | prim_util_pkg.sv 16 | tlul_pkg.sv 17 | prim_assert.sv 18 | -------------------------------------------------------------------------------- /citation.cff: -------------------------------------------------------------------------------- 1 | # This CITATION.cff file was generated with cffinit. 2 | # Visit https://bit.ly/cffinit to generate yours today! 3 | 4 | cff-version: 1.2.0 5 | title: Common Evaluation Platform 6 | message: >- 7 | If you use this software, please cite it using the 8 | metadata from this file. 9 | type: software 10 | authors: 11 | - affiliation: MIT Lincoln Laboratory 12 | email: brendon.chetwynd@ll.mit.edu 13 | name-particle: Brendon 14 | family-names: Chetwynd 15 | - name-particle: Kevin 16 | family-names: Bush 17 | email: kevin.bush@ll.mit.edu 18 | affiliation: MIT Lincoln Laboratory 19 | - name-particle: Kyle 20 | family-names: Ingols 21 | email: kwi@ll.mit.edu 22 | affiliation: MIT Lincoln Laboratory 23 | - {} 24 | repository-code: 'https://github.com/mit-ll/CEP.git' 25 | keywords: 26 | - >- 27 | RISC-V, Rocket-Chip, Chipyard, Open Source 28 | Hardware, SoC Design, Semiconductor Security, 29 | Verification 30 | license: BSD-2-Clause 31 | version: v4.0 32 | -------------------------------------------------------------------------------- /docs/Advanced-Concepts/index.rst: -------------------------------------------------------------------------------- 1 | Advanced Concepts 2 | ================================ 3 | 4 | The following sections are advanced topics about how to Chipyard works, how to use Chipyard, and special features of the framework. 5 | They expect you to know about Chisel, Parameters, configs, etc. 6 | 7 | .. toctree:: 8 | :maxdepth: 2 9 | :caption: Advanced Concepts: 10 | 11 | Top-Testharness 12 | Chip-Communication 13 | Debugging-RTL 14 | Debugging-BOOM 15 | Resources 16 | CDEs 17 | Harness-Clocks 18 | Managing-Published-Scala-Dependencies 19 | 20 | -------------------------------------------------------------------------------- /docs/Generators/Gemmini.rst: -------------------------------------------------------------------------------- 1 | Gemmini 2 | ==================================== 3 | 4 | The Gemmini project is developing a full-system, full-stack DNN hardware exploration and evaluation platform. 5 | Gemmini enables architects to make useful insights into how different components of the system and software stack (outside of just the accelerator itself) interact to affect overall DNN performance. 6 | 7 | Check out `Gemmini's documentation `__ to learn how to generate, simulate, and profile DNN accelerators with Gemmini and Chipyard. 8 | 9 | .. image:: ../_static/images/gemmini-system.png 10 | 11 | -------------------------------------------------------------------------------- /docs/VLSI/index.rst: -------------------------------------------------------------------------------- 1 | VLSI Flow 2 | ================================ 3 | 4 | The Chipyard framework aims to provide wrappers for a general VLSI flow. 5 | In particular, we aim to support the Hammer physical design generator flow. 6 | 7 | .. toctree:: 8 | :maxdepth: 2 9 | :caption: VLSI Flow: 10 | 11 | Building-A-Chip 12 | Hammer 13 | Basic-Flow 14 | ASAP7-Tutorial 15 | Sky130-Tutorial 16 | Advanced-Usage 17 | -------------------------------------------------------------------------------- /fpga/.gitignore: -------------------------------------------------------------------------------- 1 | generated-src 2 | *.log 3 | *.jou 4 | .Xil/ 5 | -------------------------------------------------------------------------------- /fpga/program_arty100t_flash.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #//-------------------------------------------------------------------------------------- 3 | #// Copyright 2022 Massachusets Institute of Technology 4 | #// SPDX short identifier: BSD-2-Clause 5 | #// 6 | #// File : program_arty100t_flash.tcl 7 | #// Project : Common Evaluation Platform (CEP) 8 | #// Description : Shell script for invoking program_arty100t_flash.tcl 9 | #// Notes : exit script if any command fails 10 | #//-------------------------------------------------------------------------------------- 11 | set -e 12 | set -o pipefail 13 | 14 | vivado -mode tcl -source program_arty100t_flash.tcl 15 | -------------------------------------------------------------------------------- /fpga/program_arty100t_jtag.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #//-------------------------------------------------------------------------------------- 3 | #// Copyright 2022 Massachusets Institute of Technology 4 | #// SPDX short identifier: BSD-2-Clause 5 | #// 6 | #// File : program_arty100t_jtag.sh 7 | #// Project : Common Evaluation Platform (CEP) 8 | #// Description : Shell script for invoking program_arty100t_jtag.tcl 9 | #// Notes : exit script if any command fails 10 | #//-------------------------------------------------------------------------------------- 11 | set -e 12 | set -o pipefail 13 | 14 | vivado -mode tcl -source program_arty100t.tcl 15 | -------------------------------------------------------------------------------- /fpga/program_arty100t_jtag.tcl: -------------------------------------------------------------------------------- 1 | #//-------------------------------------------------------------------------------------- 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File : program_arty100t_jtag.tcl 6 | #// Project : Common Evaluation Platform (CEP) 7 | #// Description : TCL script for automatic programming of Arty100t CEP build via JTA 8 | #// Notes : 9 | #//-------------------------------------------------------------------------------------- 10 | open_hw_manager 11 | connect_hw_server 12 | open_hw_target 13 | set_property PROGRAM.FILE {./generated-src/chipyard.fpga.arty100t.Arty100TFPGATestHarness.RocketArty100TCEPConfig/obj/Arty100TFPGATestHarness.bit} [get_hw_devices xc7a100t_0] 14 | program_hw_devices 15 | close_hw_manager 16 | quit 17 | -------------------------------------------------------------------------------- /fpga/program_vc707_flash.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #//-------------------------------------------------------------------------------------- 3 | #// Copyright 2022 Massachusets Institute of Technology 4 | #// SPDX short identifier: BSD-2-Clause 5 | #// 6 | #// File : program_vc707_flash.sh 7 | #// Project : Common Evaluation Platform (CEP) 8 | #// Description : Shell script for invoking program_vc707_flash.tcl 9 | #// Notes : exit script if any command fails 10 | #//-------------------------------------------------------------------------------------- 11 | set -e 12 | set -o pipefail 13 | 14 | vivado -mode tcl -source program_vc707_flash.tcl 15 | -------------------------------------------------------------------------------- /fpga/program_vc707_jtag.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #//-------------------------------------------------------------------------------------- 3 | #// Copyright 2022 Massachusets Institute of Technology 4 | #// SPDX short identifier: BSD-2-Clause 5 | #// 6 | #// File : program_vc707_jtag.sh 7 | #// Project : Common Evaluation Platform (CEP) 8 | #// Description : Shell script for invoking program_vc707_jtag.tcl 9 | #// Notes : exit script if any command fails 10 | #//-------------------------------------------------------------------------------------- 11 | set -e 12 | set -o pipefail 13 | 14 | vivado -mode tcl -source program_vc707_jtag.tcl 15 | -------------------------------------------------------------------------------- /fpga/program_vc707_jtag.tcl: -------------------------------------------------------------------------------- 1 | #//-------------------------------------------------------------------------------------- 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File : program_vc707_jtag.tcl 6 | #// Project : Common Evaluation Platform (CEP) 7 | #// Description : TCL script for automatic programming of VC707 CEP build via JTAG 8 | #// Notes : 9 | #//-------------------------------------------------------------------------------------- 10 | open_hw_manager 11 | connect_hw_server 12 | open_hw_target 13 | set_property PROGRAM.FILE {./generated-src/chipyard.fpga.vc707.VC707FPGATestHarness.RocketVC707CEPConfig/obj/VC707FPGATestHarness.bit} [get_hw_devices xc7vx485t_0] 14 | program_hw_devices 15 | close_hw_manager 16 | quit 17 | -------------------------------------------------------------------------------- /fpga/program_vcu118_flash.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #//-------------------------------------------------------------------------------------- 3 | #// Copyright 2022 Massachusets Institute of Technology 4 | #// SPDX short identifier: BSD-2-Clause 5 | #// 6 | #// File : program_vcu118_flash.sh 7 | #// Project : Common Evaluation Platform (CEP) 8 | #// Description : Shell script for invoking program_vcu118_flash.tcl 9 | #// Notes : exit script if any command fails 10 | #//-------------------------------------------------------------------------------------- 11 | set -e 12 | set -o pipefail 13 | 14 | vivado -mode tcl -source program_vcu118_flash.tcl 15 | -------------------------------------------------------------------------------- /fpga/program_vcu118_jtag.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #//-------------------------------------------------------------------------------------- 3 | #// Copyright 2022 Massachusets Institute of Technology 4 | #// SPDX short identifier: BSD-2-Clause 5 | #// 6 | #// File : program_vcu118_jtag.sh 7 | #// Project : Common Evaluation Platform (CEP) 8 | #// Description : Shell script for invoking program_vcu118_jtag.tcl 9 | #// Notes : exit script if any command fails 10 | #//-------------------------------------------------------------------------------------- 11 | set -e 12 | set -o pipefail 13 | 14 | vivado -mode tcl -source program_vcu118_jtag.tcl 15 | -------------------------------------------------------------------------------- /fpga/program_vcu118_jtag.tcl: -------------------------------------------------------------------------------- 1 | #//-------------------------------------------------------------------------------------- 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File : program_vcu118_jtag.tcl 6 | #// Project : Common Evaluation Platform (CEP) 7 | #// Description : TCL script for automatic programming of the VCU118 CEP build via JTAG 8 | #// Notes : 9 | #//-------------------------------------------------------------------------------------- 10 | open_hw_manager 11 | connect_hw_server 12 | open_hw_target 13 | set_property PROGRAM.FILE {./generated-src/chipyard.fpga.vcu118.VCU118FPGATestHarness.RocketVCU118CEPConfig/obj/VCU118FPGATestHarness.bit} [get_hw_devices xcvu9p_0] 14 | program_hw_devices 15 | close_hw_manager 16 | quit 17 | -------------------------------------------------------------------------------- /fpga/scripts/create_project.tcl: -------------------------------------------------------------------------------- 1 | # Set the variable for the directory that includes all scripts 2 | 3 | set scriptdir [file join [file dirname [info script]] "../fpga-shells/xilinx/common/tcl"] 4 | 5 | # Set up variables and Vivado objects 6 | source [file join $scriptdir "prologue.tcl"] 7 | 8 | # Initialize Vivado project files 9 | source [file join $scriptdir "init.tcl"] -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/cep_sdboot/head.S: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #include 3 | #include 4 | 5 | .section .text.init 6 | .option norvc 7 | .globl _prog_start 8 | _prog_start: 9 | smp_pause(s1, s2) 10 | li sp, (MEMORY_MEM_ADDR + 0xffff000) 11 | call main 12 | smp_resume(s1, s2) 13 | csrr a0, mhartid // hartid for next level bootloader 14 | la a1, dtb // dtb address for next level bootloader 15 | li s1, MEMORY_MEM_ADDR 16 | jr s1 17 | 18 | .section .dtb 19 | .align 3 20 | dtb: 21 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/cep_sdboot/include/const.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | /* Derived from */ 3 | 4 | #ifndef _SIFIVE_CONST_H 5 | #define _SIFIVE_CONST_H 6 | 7 | #ifdef __ASSEMBLER__ 8 | #define _AC(X,Y) X 9 | #define _AT(T,X) X 10 | #else 11 | #define _AC(X,Y) (X##Y) 12 | #define _AT(T,X) ((T)(X)) 13 | #endif /* !__ASSEMBLER__*/ 14 | 15 | #define _BITUL(x) (_AC(1,UL) << (x)) 16 | #define _BITULL(x) (_AC(1,ULL) << (x)) 17 | 18 | #endif /* _SIFIVE_CONST_H */ 19 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/cep_sdboot/include/devices/cepregs.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _CEPREGS_H 4 | #define _CEPREGS_H 5 | 6 | /* Register offsets */ 7 | #define CEPREGS_VERSION 0x0000 8 | #define CEPREGS_TESTNSET 0xFD10 9 | #define CEPREGS_SCRATCH_W0 0xFE00 10 | #define CEPREGS_SCRATCH_W1 0xFE08 11 | #define CEPREGS_SCRATCH_W2 0xFE10 12 | #define CEPREGS_SCRATCH_W3 0xFE18 13 | #define CEPREGS_SCRATCH_W4 0xFE20 14 | #define CEPREGS_SCRATCH_W5 0xFE28 15 | #define CEPREGS_SCRATCH_W6 0xFE30 16 | #define CEPREGS_SCRATCH_W7 0xFE38 17 | #define CEPREGS_CORE0_STATUS 0xFF00 18 | #define CEPREGS_CORE1_STATUS 0xFF08 19 | #define CEPREGS_CORE2_STATUS 0xFF10 20 | #define CEPREGS_CORE3_STATUS 0xFF18 21 | 22 | #endif /* _CEPREGS_H */ 23 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/cep_sdboot/include/devices/clint.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_CLINT_H 4 | #define _SIFIVE_CLINT_H 5 | 6 | 7 | #define CLINT_MSIP 0x0000 8 | #define CLINT_MSIP_size 0x4 9 | #define CLINT_MTIMECMP 0x4000 10 | #define CLINT_MTIMECMP_size 0x8 11 | #define CLINT_MTIME 0xBFF8 12 | #define CLINT_MTIME_size 0x8 13 | 14 | #endif /* _SIFIVE_CLINT_H */ 15 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/cep_sdboot/include/devices/gpio.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_GPIO_H 4 | #define _SIFIVE_GPIO_H 5 | 6 | #define GPIO_INPUT_VAL (0x00) 7 | #define GPIO_INPUT_EN (0x04) 8 | #define GPIO_OUTPUT_EN (0x08) 9 | #define GPIO_OUTPUT_VAL (0x0C) 10 | #define GPIO_PULLUP_EN (0x10) 11 | #define GPIO_DRIVE (0x14) 12 | #define GPIO_RISE_IE (0x18) 13 | #define GPIO_RISE_IP (0x1C) 14 | #define GPIO_FALL_IE (0x20) 15 | #define GPIO_FALL_IP (0x24) 16 | #define GPIO_HIGH_IE (0x28) 17 | #define GPIO_HIGH_IP (0x2C) 18 | #define GPIO_LOW_IE (0x30) 19 | #define GPIO_LOW_IP (0x34) 20 | #define GPIO_IOF_EN (0x38) 21 | #define GPIO_IOF_SEL (0x3C) 22 | #define GPIO_OUTPUT_XOR (0x40) 23 | 24 | #endif /* _SIFIVE_GPIO_H */ 25 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/cep_sdboot/include/devices/uart.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_UART_H 4 | #define _SIFIVE_UART_H 5 | 6 | /* Register offsets */ 7 | #define UART_REG_TXFIFO 0x00 8 | #define UART_REG_RXFIFO 0x04 9 | #define UART_REG_TXCTRL 0x08 10 | #define UART_REG_RXCTRL 0x0c 11 | #define UART_REG_IE 0x10 12 | #define UART_REG_IP 0x14 13 | #define UART_REG_DIV 0x18 14 | 15 | /* TXCTRL register */ 16 | #define UART_TXEN 0x1 17 | #define UART_TXNSTOP 0x2 18 | #define UART_TXWM(x) (((x) & 0xffff) << 16) 19 | 20 | /* RXCTRL register */ 21 | #define UART_RXEN 0x1 22 | #define UART_RXWM(x) (((x) & 0xffff) << 16) 23 | 24 | /* IP register */ 25 | #define UART_IP_TXWM 0x1 26 | #define UART_IP_RXWM 0x2 27 | 28 | #endif /* _SIFIVE_UART_H */ 29 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/cep_sdboot/include/kprintf.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #ifndef _SDBOOT_KPRINTF_H 3 | #define _SDBOOT_KPRINTF_H 4 | 5 | #include 6 | #include 7 | 8 | #define REG32(p, i) ((p)[(i) >> 2]) 9 | 10 | #define UART_RXEMPTY (1 << 31) 11 | 12 | #ifndef UART_CTRL_ADDR 13 | #ifndef UART_NUM 14 | #define UART_NUM 0 15 | #endif 16 | 17 | #define _CONCAT3(A, B, C) A ## B ## C 18 | #define _UART_CTRL_ADDR(UART_NUM) _CONCAT3(UART, UART_NUM, _CTRL_ADDR) 19 | #define UART_CTRL_ADDR _UART_CTRL_ADDR(UART_NUM) 20 | #endif 21 | static volatile uint32_t * const uart = (void *)(UART_CTRL_ADDR); 22 | 23 | 24 | void kputc(int c); 25 | int kgetc(void); 26 | void kputs(const char *); 27 | 28 | #endif /* _SDBOOT_KPRINTF_H */ 29 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/cep_sdboot/include/sections.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #ifndef _SECTIONS_H 3 | #define _SECTIONS_H 4 | 5 | extern unsigned char _rom[]; 6 | extern unsigned char _rom_end[]; 7 | 8 | extern unsigned char _ram[]; 9 | extern unsigned char _ram_end[]; 10 | 11 | extern unsigned char _ftext[]; 12 | extern unsigned char _etext[]; 13 | extern unsigned char _fbss[]; 14 | extern unsigned char _ebss[]; 15 | extern unsigned char _end[]; 16 | 17 | #endif /* _SECTIONS_H */ 18 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/cep_sdboot/kprintf.c: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #include 3 | #include 4 | #include 5 | #include "kprintf.h" 6 | 7 | void kputc(int c) 8 | { 9 | #ifndef DISABLE_KPRINTF 10 | volatile uint32_t *tx = ®32(uart, UART_REG_TXFIFO); 11 | while ((int32_t)(*tx) < 0); 12 | *tx = (c & 0xFF); 13 | #endif 14 | } 15 | 16 | int kgetc(void) 17 | { 18 | #ifndef DISABLE_KPRINTF 19 | uint32_t ch; 20 | volatile uint32_t *rx = ®32(uart, UART_REG_RXFIFO); 21 | ch = *rx; 22 | 23 | if ((uint32_t)(ch & UART_RXEMPTY)) { 24 | return -1; 25 | } else { 26 | return(ch & 0x0ff); 27 | } 28 | #else 29 | return -1; 30 | #endif 31 | } 32 | 33 | void kputs(const char *s) 34 | { 35 | char c; 36 | while (*s != '\0') { 37 | c = *s; 38 | kputc((int) c); 39 | s++; 40 | } 41 | kputc('\r'); 42 | kputc('\n'); 43 | } -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/sdboot/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/sdboot/common.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #ifndef _SDBOOT_COMMON_H 3 | #define _SDBOOT_COMMON_H 4 | 5 | #ifndef PAYLOAD_DEST 6 | #define PAYLOAD_DEST MEMORY_MEM_ADDR 7 | #endif 8 | 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/sdboot/head.S: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #include 3 | #include 4 | #include "common.h" 5 | 6 | .section .text.init 7 | .option norvc 8 | .globl _prog_start 9 | _prog_start: 10 | smp_pause(s1, s2) 11 | li sp, (PAYLOAD_DEST + 0xffff000) 12 | call main 13 | smp_resume(s1, s2) 14 | csrr a0, mhartid // hartid for next level bootloader 15 | la a1, dtb // dtb address for next level bootloader 16 | li s1, PAYLOAD_DEST 17 | jr s1 18 | 19 | .section .dtb 20 | .align 3 21 | dtb: 22 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/sdboot/include/const.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | /* Derived from */ 3 | 4 | #ifndef _SIFIVE_CONST_H 5 | #define _SIFIVE_CONST_H 6 | 7 | #ifdef __ASSEMBLER__ 8 | #define _AC(X,Y) X 9 | #define _AT(T,X) X 10 | #else 11 | #define _AC(X,Y) (X##Y) 12 | #define _AT(T,X) ((T)(X)) 13 | #endif /* !__ASSEMBLER__*/ 14 | 15 | #define _BITUL(x) (_AC(1,UL) << (x)) 16 | #define _BITULL(x) (_AC(1,ULL) << (x)) 17 | 18 | #endif /* _SIFIVE_CONST_H */ 19 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/sdboot/include/devices/cepregs.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _CEPREGS_H 4 | #define _CEPREGS_H 5 | 6 | /* Register offsets */ 7 | #define CEPREGS_VERSION 0x0000 8 | #define CEPREGS_TESTNSET 0xFD10 9 | #define CEPREGS_SCRATCH_W0 0xFE00 10 | #define CEPREGS_SCRATCH_W1 0xFE08 11 | #define CEPREGS_SCRATCH_W2 0xFE10 12 | #define CEPREGS_SCRATCH_W3 0xFE18 13 | #define CEPREGS_SCRATCH_W4 0xFE20 14 | #define CEPREGS_SCRATCH_W5 0xFE28 15 | #define CEPREGS_SCRATCH_W6 0xFE30 16 | #define CEPREGS_SCRATCH_W7 0xFE38 17 | #define CEPREGS_CORE0_STATUS 0xFF00 18 | #define CEPREGS_CORE1_STATUS 0xFF08 19 | #define CEPREGS_CORE2_STATUS 0xFF10 20 | #define CEPREGS_CORE3_STATUS 0xFF18 21 | 22 | #endif /* _CEPREGS_H */ 23 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/sdboot/include/devices/clint.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_CLINT_H 4 | #define _SIFIVE_CLINT_H 5 | 6 | 7 | #define CLINT_MSIP 0x0000 8 | #define CLINT_MSIP_size 0x4 9 | #define CLINT_MTIMECMP 0x4000 10 | #define CLINT_MTIMECMP_size 0x8 11 | #define CLINT_MTIME 0xBFF8 12 | #define CLINT_MTIME_size 0x8 13 | 14 | #endif /* _SIFIVE_CLINT_H */ 15 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/sdboot/include/devices/gpio.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_GPIO_H 4 | #define _SIFIVE_GPIO_H 5 | 6 | #define GPIO_INPUT_VAL (0x00) 7 | #define GPIO_INPUT_EN (0x04) 8 | #define GPIO_OUTPUT_EN (0x08) 9 | #define GPIO_OUTPUT_VAL (0x0C) 10 | #define GPIO_PULLUP_EN (0x10) 11 | #define GPIO_DRIVE (0x14) 12 | #define GPIO_RISE_IE (0x18) 13 | #define GPIO_RISE_IP (0x1C) 14 | #define GPIO_FALL_IE (0x20) 15 | #define GPIO_FALL_IP (0x24) 16 | #define GPIO_HIGH_IE (0x28) 17 | #define GPIO_HIGH_IP (0x2C) 18 | #define GPIO_LOW_IE (0x30) 19 | #define GPIO_LOW_IP (0x34) 20 | #define GPIO_IOF_EN (0x38) 21 | #define GPIO_IOF_SEL (0x3C) 22 | #define GPIO_OUTPUT_XOR (0x40) 23 | 24 | #endif /* _SIFIVE_GPIO_H */ 25 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/sdboot/include/devices/uart.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_UART_H 4 | #define _SIFIVE_UART_H 5 | 6 | /* Register offsets */ 7 | #define UART_REG_TXFIFO 0x00 8 | #define UART_REG_RXFIFO 0x04 9 | #define UART_REG_TXCTRL 0x08 10 | #define UART_REG_RXCTRL 0x0c 11 | #define UART_REG_IE 0x10 12 | #define UART_REG_IP 0x14 13 | #define UART_REG_DIV 0x18 14 | 15 | /* TXCTRL register */ 16 | #define UART_TXEN 0x1 17 | #define UART_TXNSTOP 0x2 18 | #define UART_TXWM(x) (((x) & 0xffff) << 16) 19 | 20 | /* RXCTRL register */ 21 | #define UART_RXEN 0x1 22 | #define UART_RXWM(x) (((x) & 0xffff) << 16) 23 | 24 | /* IP register */ 25 | #define UART_IP_TXWM 0x1 26 | #define UART_IP_RXWM 0x2 27 | 28 | #endif /* _SIFIVE_UART_H */ 29 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/sdboot/include/sections.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #ifndef _SECTIONS_H 3 | #define _SECTIONS_H 4 | 5 | extern unsigned char _rom[]; 6 | extern unsigned char _rom_end[]; 7 | 8 | extern unsigned char _ram[]; 9 | extern unsigned char _ram_end[]; 10 | 11 | extern unsigned char _ftext[]; 12 | extern unsigned char _etext[]; 13 | extern unsigned char _fbss[]; 14 | extern unsigned char _ebss[]; 15 | extern unsigned char _end[]; 16 | 17 | #endif /* _SECTIONS_H */ 18 | -------------------------------------------------------------------------------- /fpga/src/main/resources/arty100t/sdboot/linker/memory.lds: -------------------------------------------------------------------------------- 1 | MEMORY 2 | { 3 | bootrom_mem (rx) : ORIGIN = 0x10000, LENGTH = 0x2000 4 | memory_mem (rwx) : ORIGIN = 0x80000000, LENGTH = 0x40000000 5 | } 6 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vc707/cep_sdboot/.gitignore: -------------------------------------------------------------------------------- 1 | build/* -------------------------------------------------------------------------------- /fpga/src/main/resources/vc707/cep_sdboot/head.S: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #include 3 | #include 4 | 5 | .section .text.init 6 | .option norvc 7 | .globl _prog_start 8 | _prog_start: 9 | smp_pause(s1, s2) 10 | li sp, (MEMORY_MEM_ADDR + 0xffff000) 11 | call main 12 | smp_resume(s1, s2) 13 | csrr a0, mhartid // hartid for next level bootloader 14 | la a1, dtb // dtb address for next level bootloader 15 | li s1, MEMORY_MEM_ADDR 16 | jr s1 17 | 18 | .section .dtb 19 | .align 3 20 | dtb: 21 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vc707/cep_sdboot/include/const.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | /* Derived from */ 3 | 4 | #ifndef _SIFIVE_CONST_H 5 | #define _SIFIVE_CONST_H 6 | 7 | #ifdef __ASSEMBLER__ 8 | #define _AC(X,Y) X 9 | #define _AT(T,X) X 10 | #else 11 | #define _AC(X,Y) (X##Y) 12 | #define _AT(T,X) ((T)(X)) 13 | #endif /* !__ASSEMBLER__*/ 14 | 15 | #define _BITUL(x) (_AC(1,UL) << (x)) 16 | #define _BITULL(x) (_AC(1,ULL) << (x)) 17 | 18 | #endif /* _SIFIVE_CONST_H */ 19 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vc707/cep_sdboot/include/devices/cepregs.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _CEPREGS_H 4 | #define _CEPREGS_H 5 | 6 | /* Register offsets */ 7 | #define CEPREGS_VERSION 0x0000 8 | #define CEPREGS_TESTNSET 0xFD10 9 | #define CEPREGS_SCRATCH_W0 0xFE00 10 | #define CEPREGS_SCRATCH_W1 0xFE08 11 | #define CEPREGS_SCRATCH_W2 0xFE10 12 | #define CEPREGS_SCRATCH_W3 0xFE18 13 | #define CEPREGS_SCRATCH_W4 0xFE20 14 | #define CEPREGS_SCRATCH_W5 0xFE28 15 | #define CEPREGS_SCRATCH_W6 0xFE30 16 | #define CEPREGS_SCRATCH_W7 0xFE38 17 | #define CEPREGS_CORE0_STATUS 0xFF00 18 | #define CEPREGS_CORE1_STATUS 0xFF08 19 | #define CEPREGS_CORE2_STATUS 0xFF10 20 | #define CEPREGS_CORE3_STATUS 0xFF18 21 | 22 | #endif /* _CEPREGS_H */ 23 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vc707/cep_sdboot/include/devices/clint.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_CLINT_H 4 | #define _SIFIVE_CLINT_H 5 | 6 | 7 | #define CLINT_MSIP 0x0000 8 | #define CLINT_MSIP_size 0x4 9 | #define CLINT_MTIMECMP 0x4000 10 | #define CLINT_MTIMECMP_size 0x8 11 | #define CLINT_MTIME 0xBFF8 12 | #define CLINT_MTIME_size 0x8 13 | 14 | #endif /* _SIFIVE_CLINT_H */ 15 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vc707/cep_sdboot/include/devices/gpio.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_GPIO_H 4 | #define _SIFIVE_GPIO_H 5 | 6 | #define GPIO_INPUT_VAL (0x00) 7 | #define GPIO_INPUT_EN (0x04) 8 | #define GPIO_OUTPUT_EN (0x08) 9 | #define GPIO_OUTPUT_VAL (0x0C) 10 | #define GPIO_PULLUP_EN (0x10) 11 | #define GPIO_DRIVE (0x14) 12 | #define GPIO_RISE_IE (0x18) 13 | #define GPIO_RISE_IP (0x1C) 14 | #define GPIO_FALL_IE (0x20) 15 | #define GPIO_FALL_IP (0x24) 16 | #define GPIO_HIGH_IE (0x28) 17 | #define GPIO_HIGH_IP (0x2C) 18 | #define GPIO_LOW_IE (0x30) 19 | #define GPIO_LOW_IP (0x34) 20 | #define GPIO_IOF_EN (0x38) 21 | #define GPIO_IOF_SEL (0x3C) 22 | #define GPIO_OUTPUT_XOR (0x40) 23 | 24 | #endif /* _SIFIVE_GPIO_H */ 25 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vc707/cep_sdboot/include/devices/uart.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_UART_H 4 | #define _SIFIVE_UART_H 5 | 6 | /* Register offsets */ 7 | #define UART_REG_TXFIFO 0x00 8 | #define UART_REG_RXFIFO 0x04 9 | #define UART_REG_TXCTRL 0x08 10 | #define UART_REG_RXCTRL 0x0c 11 | #define UART_REG_IE 0x10 12 | #define UART_REG_IP 0x14 13 | #define UART_REG_DIV 0x18 14 | 15 | /* TXCTRL register */ 16 | #define UART_TXEN 0x1 17 | #define UART_TXNSTOP 0x2 18 | #define UART_TXWM(x) (((x) & 0xffff) << 16) 19 | 20 | /* RXCTRL register */ 21 | #define UART_RXEN 0x1 22 | #define UART_RXWM(x) (((x) & 0xffff) << 16) 23 | 24 | /* IP register */ 25 | #define UART_IP_TXWM 0x1 26 | #define UART_IP_RXWM 0x2 27 | 28 | #endif /* _SIFIVE_UART_H */ 29 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vc707/cep_sdboot/include/kprintf.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #ifndef _SDBOOT_KPRINTF_H 3 | #define _SDBOOT_KPRINTF_H 4 | 5 | #include 6 | #include 7 | 8 | #define REG32(p, i) ((p)[(i) >> 2]) 9 | 10 | #define UART_RXEMPTY (1 << 31) 11 | 12 | #ifndef UART_CTRL_ADDR 13 | #ifndef UART_NUM 14 | #define UART_NUM 0 15 | #endif 16 | 17 | #define _CONCAT3(A, B, C) A ## B ## C 18 | #define _UART_CTRL_ADDR(UART_NUM) _CONCAT3(UART, UART_NUM, _CTRL_ADDR) 19 | #define UART_CTRL_ADDR _UART_CTRL_ADDR(UART_NUM) 20 | #endif 21 | static volatile uint32_t * const uart = (void *)(UART_CTRL_ADDR); 22 | 23 | 24 | void kputc(int c); 25 | int kgetc(void); 26 | void kputs(const char *); 27 | 28 | #endif /* _SDBOOT_KPRINTF_H */ 29 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vc707/cep_sdboot/include/sections.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #ifndef _SECTIONS_H 3 | #define _SECTIONS_H 4 | 5 | extern unsigned char _rom[]; 6 | extern unsigned char _rom_end[]; 7 | 8 | extern unsigned char _ram[]; 9 | extern unsigned char _ram_end[]; 10 | 11 | extern unsigned char _ftext[]; 12 | extern unsigned char _etext[]; 13 | extern unsigned char _fbss[]; 14 | extern unsigned char _ebss[]; 15 | extern unsigned char _end[]; 16 | 17 | #endif /* _SECTIONS_H */ 18 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vc707/cep_sdboot/kprintf.c: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #include 3 | #include 4 | #include 5 | #include "kprintf.h" 6 | 7 | void kputc(int c) 8 | { 9 | #ifndef DISABLE_KPRINTF 10 | volatile uint32_t *tx = ®32(uart, UART_REG_TXFIFO); 11 | while ((int32_t)(*tx) < 0); 12 | *tx = (c & 0xFF); 13 | #endif 14 | } 15 | 16 | int kgetc(void) 17 | { 18 | #ifndef DISABLE_KPRINTF 19 | uint32_t ch; 20 | volatile uint32_t *rx = ®32(uart, UART_REG_RXFIFO); 21 | ch = *rx; 22 | 23 | if ((uint32_t)(ch & UART_RXEMPTY)) { 24 | return -1; 25 | } else { 26 | return(ch & 0x0ff); 27 | } 28 | #else 29 | return -1; 30 | #endif 31 | } 32 | 33 | void kputs(const char *s) 34 | { 35 | char c; 36 | while (*s != '\0') { 37 | c = *s; 38 | kputc((int) c); 39 | s++; 40 | } 41 | kputc('\r'); 42 | kputc('\n'); 43 | } -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/cep_sdboot/head.S: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #include 3 | #include 4 | 5 | .section .text.init 6 | .option norvc 7 | .globl _prog_start 8 | _prog_start: 9 | smp_pause(s1, s2) 10 | li sp, (MEMORY_MEM_ADDR + 0xffff000) 11 | call main 12 | smp_resume(s1, s2) 13 | csrr a0, mhartid // hartid for next level bootloader 14 | la a1, dtb // dtb address for next level bootloader 15 | li s1, MEMORY_MEM_ADDR 16 | jr s1 17 | 18 | .section .dtb 19 | .align 3 20 | dtb: 21 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/cep_sdboot/include/const.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | /* Derived from */ 3 | 4 | #ifndef _SIFIVE_CONST_H 5 | #define _SIFIVE_CONST_H 6 | 7 | #ifdef __ASSEMBLER__ 8 | #define _AC(X,Y) X 9 | #define _AT(T,X) X 10 | #else 11 | #define _AC(X,Y) (X##Y) 12 | #define _AT(T,X) ((T)(X)) 13 | #endif /* !__ASSEMBLER__*/ 14 | 15 | #define _BITUL(x) (_AC(1,UL) << (x)) 16 | #define _BITULL(x) (_AC(1,ULL) << (x)) 17 | 18 | #endif /* _SIFIVE_CONST_H */ 19 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/cep_sdboot/include/devices/cepregs.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _CEPREGS_H 4 | #define _CEPREGS_H 5 | 6 | /* Register offsets */ 7 | #define CEPREGS_VERSION 0x0000 8 | #define CEPREGS_TESTNSET 0xFD10 9 | #define CEPREGS_SCRATCH_W0 0xFE00 10 | #define CEPREGS_SCRATCH_W1 0xFE08 11 | #define CEPREGS_SCRATCH_W2 0xFE10 12 | #define CEPREGS_SCRATCH_W3 0xFE18 13 | #define CEPREGS_SCRATCH_W4 0xFE20 14 | #define CEPREGS_SCRATCH_W5 0xFE28 15 | #define CEPREGS_SCRATCH_W6 0xFE30 16 | #define CEPREGS_SCRATCH_W7 0xFE38 17 | #define CEPREGS_CORE0_STATUS 0xFF00 18 | #define CEPREGS_CORE1_STATUS 0xFF08 19 | #define CEPREGS_CORE2_STATUS 0xFF10 20 | #define CEPREGS_CORE3_STATUS 0xFF18 21 | 22 | #endif /* _CEPREGS_H */ 23 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/cep_sdboot/include/devices/clint.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_CLINT_H 4 | #define _SIFIVE_CLINT_H 5 | 6 | 7 | #define CLINT_MSIP 0x0000 8 | #define CLINT_MSIP_size 0x4 9 | #define CLINT_MTIMECMP 0x4000 10 | #define CLINT_MTIMECMP_size 0x8 11 | #define CLINT_MTIME 0xBFF8 12 | #define CLINT_MTIME_size 0x8 13 | 14 | #endif /* _SIFIVE_CLINT_H */ 15 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/cep_sdboot/include/devices/gpio.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_GPIO_H 4 | #define _SIFIVE_GPIO_H 5 | 6 | #define GPIO_INPUT_VAL (0x00) 7 | #define GPIO_INPUT_EN (0x04) 8 | #define GPIO_OUTPUT_EN (0x08) 9 | #define GPIO_OUTPUT_VAL (0x0C) 10 | #define GPIO_PULLUP_EN (0x10) 11 | #define GPIO_DRIVE (0x14) 12 | #define GPIO_RISE_IE (0x18) 13 | #define GPIO_RISE_IP (0x1C) 14 | #define GPIO_FALL_IE (0x20) 15 | #define GPIO_FALL_IP (0x24) 16 | #define GPIO_HIGH_IE (0x28) 17 | #define GPIO_HIGH_IP (0x2C) 18 | #define GPIO_LOW_IE (0x30) 19 | #define GPIO_LOW_IP (0x34) 20 | #define GPIO_IOF_EN (0x38) 21 | #define GPIO_IOF_SEL (0x3C) 22 | #define GPIO_OUTPUT_XOR (0x40) 23 | 24 | #endif /* _SIFIVE_GPIO_H */ 25 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/cep_sdboot/include/devices/uart.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_UART_H 4 | #define _SIFIVE_UART_H 5 | 6 | /* Register offsets */ 7 | #define UART_REG_TXFIFO 0x00 8 | #define UART_REG_RXFIFO 0x04 9 | #define UART_REG_TXCTRL 0x08 10 | #define UART_REG_RXCTRL 0x0c 11 | #define UART_REG_IE 0x10 12 | #define UART_REG_IP 0x14 13 | #define UART_REG_DIV 0x18 14 | 15 | /* TXCTRL register */ 16 | #define UART_TXEN 0x1 17 | #define UART_TXNSTOP 0x2 18 | #define UART_TXWM(x) (((x) & 0xffff) << 16) 19 | 20 | /* RXCTRL register */ 21 | #define UART_RXEN 0x1 22 | #define UART_RXWM(x) (((x) & 0xffff) << 16) 23 | 24 | /* IP register */ 25 | #define UART_IP_TXWM 0x1 26 | #define UART_IP_RXWM 0x2 27 | 28 | #endif /* _SIFIVE_UART_H */ 29 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/cep_sdboot/include/kprintf.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #ifndef _SDBOOT_KPRINTF_H 3 | #define _SDBOOT_KPRINTF_H 4 | 5 | #include 6 | #include 7 | 8 | #define REG32(p, i) ((p)[(i) >> 2]) 9 | 10 | #define UART_RXEMPTY (1 << 31) 11 | 12 | #ifndef UART_CTRL_ADDR 13 | #ifndef UART_NUM 14 | #define UART_NUM 0 15 | #endif 16 | 17 | #define _CONCAT3(A, B, C) A ## B ## C 18 | #define _UART_CTRL_ADDR(UART_NUM) _CONCAT3(UART, UART_NUM, _CTRL_ADDR) 19 | #define UART_CTRL_ADDR _UART_CTRL_ADDR(UART_NUM) 20 | #endif 21 | static volatile uint32_t * const uart = (void *)(UART_CTRL_ADDR); 22 | 23 | 24 | void kputc(int c); 25 | int kgetc(void); 26 | void kputs(const char *); 27 | 28 | #endif /* _SDBOOT_KPRINTF_H */ 29 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/cep_sdboot/include/sections.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #ifndef _SECTIONS_H 3 | #define _SECTIONS_H 4 | 5 | extern unsigned char _rom[]; 6 | extern unsigned char _rom_end[]; 7 | 8 | extern unsigned char _ram[]; 9 | extern unsigned char _ram_end[]; 10 | 11 | extern unsigned char _ftext[]; 12 | extern unsigned char _etext[]; 13 | extern unsigned char _fbss[]; 14 | extern unsigned char _ebss[]; 15 | extern unsigned char _end[]; 16 | 17 | #endif /* _SECTIONS_H */ 18 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/cep_sdboot/kprintf.c: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #include 3 | #include 4 | #include 5 | #include "kprintf.h" 6 | 7 | void kputc(int c) 8 | { 9 | #ifndef DISABLE_KPRINTF 10 | volatile uint32_t *tx = ®32(uart, UART_REG_TXFIFO); 11 | while ((int32_t)(*tx) < 0); 12 | *tx = (c & 0xFF); 13 | #endif 14 | } 15 | 16 | int kgetc(void) 17 | { 18 | #ifndef DISABLE_KPRINTF 19 | uint32_t ch; 20 | volatile uint32_t *rx = ®32(uart, UART_REG_RXFIFO); 21 | ch = *rx; 22 | 23 | if ((uint32_t)(ch & UART_RXEMPTY)) { 24 | return -1; 25 | } else { 26 | return(ch & 0x0ff); 27 | } 28 | #else 29 | return -1; 30 | #endif 31 | } 32 | 33 | void kputs(const char *s) 34 | { 35 | char c; 36 | while (*s != '\0') { 37 | c = *s; 38 | kputc((int) c); 39 | s++; 40 | } 41 | kputc('\r'); 42 | kputc('\n'); 43 | } -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/sdboot/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/sdboot/common.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #ifndef _SDBOOT_COMMON_H 3 | #define _SDBOOT_COMMON_H 4 | 5 | #ifndef PAYLOAD_DEST 6 | #define PAYLOAD_DEST MEMORY_MEM_ADDR 7 | #endif 8 | 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/sdboot/head.S: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #include 3 | #include 4 | #include "common.h" 5 | 6 | .section .text.init 7 | .option norvc 8 | .globl _prog_start 9 | _prog_start: 10 | smp_pause(s1, s2) 11 | li sp, (PAYLOAD_DEST + 0xffff000) 12 | call main 13 | smp_resume(s1, s2) 14 | csrr a0, mhartid // hartid for next level bootloader 15 | la a1, dtb // dtb address for next level bootloader 16 | li s1, PAYLOAD_DEST 17 | jr s1 18 | 19 | .section .dtb 20 | .align 3 21 | dtb: 22 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/sdboot/include/const.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | /* Derived from */ 3 | 4 | #ifndef _SIFIVE_CONST_H 5 | #define _SIFIVE_CONST_H 6 | 7 | #ifdef __ASSEMBLER__ 8 | #define _AC(X,Y) X 9 | #define _AT(T,X) X 10 | #else 11 | #define _AC(X,Y) (X##Y) 12 | #define _AT(T,X) ((T)(X)) 13 | #endif /* !__ASSEMBLER__*/ 14 | 15 | #define _BITUL(x) (_AC(1,UL) << (x)) 16 | #define _BITULL(x) (_AC(1,ULL) << (x)) 17 | 18 | #endif /* _SIFIVE_CONST_H */ 19 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/sdboot/include/devices/clint.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_CLINT_H 4 | #define _SIFIVE_CLINT_H 5 | 6 | 7 | #define CLINT_MSIP 0x0000 8 | #define CLINT_MSIP_size 0x4 9 | #define CLINT_MTIMECMP 0x4000 10 | #define CLINT_MTIMECMP_size 0x8 11 | #define CLINT_MTIME 0xBFF8 12 | #define CLINT_MTIME_size 0x8 13 | 14 | #endif /* _SIFIVE_CLINT_H */ 15 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/sdboot/include/devices/gpio.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_GPIO_H 4 | #define _SIFIVE_GPIO_H 5 | 6 | #define GPIO_INPUT_VAL (0x00) 7 | #define GPIO_INPUT_EN (0x04) 8 | #define GPIO_OUTPUT_EN (0x08) 9 | #define GPIO_OUTPUT_VAL (0x0C) 10 | #define GPIO_PULLUP_EN (0x10) 11 | #define GPIO_DRIVE (0x14) 12 | #define GPIO_RISE_IE (0x18) 13 | #define GPIO_RISE_IP (0x1C) 14 | #define GPIO_FALL_IE (0x20) 15 | #define GPIO_FALL_IP (0x24) 16 | #define GPIO_HIGH_IE (0x28) 17 | #define GPIO_HIGH_IP (0x2C) 18 | #define GPIO_LOW_IE (0x30) 19 | #define GPIO_LOW_IP (0x34) 20 | #define GPIO_IOF_EN (0x38) 21 | #define GPIO_IOF_SEL (0x3C) 22 | #define GPIO_OUTPUT_XOR (0x40) 23 | 24 | #endif /* _SIFIVE_GPIO_H */ 25 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/sdboot/include/devices/uart.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_UART_H 4 | #define _SIFIVE_UART_H 5 | 6 | /* Register offsets */ 7 | #define UART_REG_TXFIFO 0x00 8 | #define UART_REG_RXFIFO 0x04 9 | #define UART_REG_TXCTRL 0x08 10 | #define UART_REG_RXCTRL 0x0c 11 | #define UART_REG_IE 0x10 12 | #define UART_REG_IP 0x14 13 | #define UART_REG_DIV 0x18 14 | 15 | /* TXCTRL register */ 16 | #define UART_TXEN 0x1 17 | #define UART_TXNSTOP 0x2 18 | #define UART_TXWM(x) (((x) & 0xffff) << 16) 19 | 20 | /* RXCTRL register */ 21 | #define UART_RXEN 0x1 22 | #define UART_RXWM(x) (((x) & 0xffff) << 16) 23 | 24 | /* IP register */ 25 | #define UART_IP_TXWM 0x1 26 | #define UART_IP_RXWM 0x2 27 | 28 | #endif /* _SIFIVE_UART_H */ 29 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/sdboot/include/sections.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #ifndef _SECTIONS_H 3 | #define _SECTIONS_H 4 | 5 | extern unsigned char _rom[]; 6 | extern unsigned char _rom_end[]; 7 | 8 | extern unsigned char _ram[]; 9 | extern unsigned char _ram_end[]; 10 | 11 | extern unsigned char _ftext[]; 12 | extern unsigned char _etext[]; 13 | extern unsigned char _fbss[]; 14 | extern unsigned char _ebss[]; 15 | extern unsigned char _end[]; 16 | 17 | #endif /* _SECTIONS_H */ 18 | -------------------------------------------------------------------------------- /fpga/src/main/resources/vcu118/sdboot/linker/memory.lds: -------------------------------------------------------------------------------- 1 | MEMORY 2 | { 3 | bootrom_mem (rx) : ORIGIN = 0x10000, LENGTH = 0x2000 4 | memory_mem (rwx) : ORIGIN = 0x80000000, LENGTH = 0x40000000 5 | } 6 | -------------------------------------------------------------------------------- /fpga/src/main/scala/arty/IOBinders.scala: -------------------------------------------------------------------------------- 1 | package chipyard.fpga.arty 2 | 3 | import chisel3._ 4 | import chisel3.experimental.{IO} 5 | 6 | import freechips.rocketchip.util._ 7 | import freechips.rocketchip.devices.debug._ 8 | 9 | import chipyard.iobinders.{ComposeIOBinder} 10 | 11 | class WithDebugResetPassthrough extends ComposeIOBinder({ 12 | (system: HasPeripheryDebugModuleImp) => { 13 | // Debug module reset 14 | val io_ndreset: Bool = IO(Output(Bool())).suggestName("ndreset") 15 | io_ndreset := system.debug.get.ndreset 16 | 17 | // JTAG reset 18 | val sjtag = system.debug.get.systemjtag.get 19 | val io_sjtag_reset: Bool = IO(Input(Bool())).suggestName("sjtag_reset") 20 | sjtag.reset := io_sjtag_reset 21 | 22 | (Seq(io_ndreset, io_sjtag_reset), Nil) 23 | } 24 | }) 25 | -------------------------------------------------------------------------------- /generators/chipyard/src/main/resources/vsrc/pll_wrapper.sv: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: cep_tb.v 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: CEP Co-Simulation Top Level Testbench 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | module pll_wrapper ( 12 | input clk_in, 13 | input reset_in, 14 | output clk_out, 15 | output reset_out 16 | ); 17 | 18 | 19 | assign clk_out = clk_in; 20 | assign reset_out = reset_in; 21 | 22 | endmodule // pll_wrapper -------------------------------------------------------------------------------- /generators/chipyard/src/main/scala/Generator.scala: -------------------------------------------------------------------------------- 1 | package chipyard 2 | 3 | import firrtl.options.{StageMain} 4 | import chipyard.stage.ChipyardStage 5 | 6 | object Generator extends StageMain(new ChipyardStage) 7 | -------------------------------------------------------------------------------- /generators/chipyard/src/main/scala/clocking/ClockDividerN.scala: -------------------------------------------------------------------------------- 1 | // See LICENSE for license details. 2 | 3 | package chipyard.clocking 4 | 5 | import chisel3._ 6 | import chisel3.util._ 7 | 8 | class ClockDividerN(div: Int) extends BlackBox(Map("DIV" -> div)) with HasBlackBoxResource { 9 | require(div > 0); 10 | val io = IO(new Bundle { 11 | val clk_out = Output(Clock()) 12 | val clk_in = Input(Clock()) 13 | }) 14 | addResource("/vsrc/ClockDividerN.sv") 15 | } 16 | 17 | object ClockDivideByN { 18 | def apply(clockIn: Clock, div: Int): Clock = { 19 | val clockDivider = Module(new ClockDividerN(div)) 20 | clockDivider.io.clk_in := clockIn 21 | clockDivider.io.clk_out 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /generators/chipyard/src/main/scala/config/CVA6Configs.scala: -------------------------------------------------------------------------------- 1 | package chipyard 2 | 3 | import chisel3._ 4 | 5 | import freechips.rocketchip.config.{Config} 6 | 7 | // --------------------- 8 | // CVA6 Configs 9 | // --------------------- 10 | 11 | class CVA6Config extends Config( 12 | new cva6.WithNCVA6Cores(1) ++ // single CVA6 core 13 | new chipyard.config.AbstractConfig) 14 | 15 | class dmiCVA6Config extends Config( 16 | new chipyard.harness.WithSerialAdapterTiedOff ++ // Tie off the serial port, override default instantiation of SimSerial 17 | new chipyard.config.WithDMIDTM ++ // have debug module expose a clocked DMI port 18 | new cva6.WithNCVA6Cores(1) ++ // single CVA6 core 19 | new chipyard.config.AbstractConfig) 20 | -------------------------------------------------------------------------------- /generators/chipyard/src/main/scala/config/IbexConfigs.scala: -------------------------------------------------------------------------------- 1 | package chipyard 2 | 3 | import chisel3._ 4 | 5 | import freechips.rocketchip.config.{Config} 6 | 7 | // --------------------- 8 | // Ibex Configs 9 | // --------------------- 10 | 11 | // Multi-core and 32b heterogeneous configs are supported 12 | 13 | class IbexConfig extends Config( 14 | new ibex.WithNIbexCores(1) ++ 15 | new chipyard.config.AbstractConfig) -------------------------------------------------------------------------------- /generators/chipyard/src/main/scala/config/RocketSha3Configs.scala: -------------------------------------------------------------------------------- 1 | package chipyard 2 | 3 | import freechips.rocketchip.config.{Config} 4 | import freechips.rocketchip.diplomacy.{AsynchronousCrossing} 5 | 6 | // -------------- 7 | // Rocket+SHA3 Configs 8 | // These live in a separate file to simplify patching out for the tutorials. 9 | // -------------- 10 | 11 | // DOC include start: Sha3Rocket 12 | class Sha3RocketConfig extends Config( 13 | new sha3.WithSha3Accel ++ // add SHA3 rocc accelerator 14 | new freechips.rocketchip.subsystem.WithNBigCores(1) ++ 15 | new chipyard.config.AbstractConfig) 16 | // DOC include end: Sha3Rocket 17 | 18 | class Sha3RocketPrintfConfig extends Config( 19 | new sha3.WithSha3Printf ++ 20 | new sha3.WithSha3Accel ++ // add SHA3 rocc accelerator 21 | new freechips.rocketchip.subsystem.WithNBigCores(1) ++ 22 | new chipyard.config.AbstractConfig) 23 | 24 | -------------------------------------------------------------------------------- /generators/chipyard/src/main/scala/config/fragments/SubsystemFragments.scala: -------------------------------------------------------------------------------- 1 | package chipyard.config 2 | 3 | import freechips.rocketchip.config.{Config} 4 | import freechips.rocketchip.subsystem.{SystemBusKey, BankedL2Key, CoherenceManagerWrapper} 5 | 6 | // Replaces the L2 with a broadcast manager for maintaining coherence 7 | class WithBroadcastManager extends Config((site, here, up) => { 8 | case BankedL2Key => up(BankedL2Key, site).copy(coherenceManager = CoherenceManagerWrapper.broadcastManager) 9 | }) 10 | 11 | class WithSystemBusWidth(bitWidth: Int) extends Config((site, here, up) => { 12 | case SystemBusKey => up(SystemBusKey, site).copy(beatBytes=bitWidth/8) 13 | }) 14 | -------------------------------------------------------------------------------- /generators/chipyard/src/main/scala/config/fragments/TracegenFragments.scala: -------------------------------------------------------------------------------- 1 | package chipyard.config 2 | 3 | import freechips.rocketchip.config.{Config, Field, Parameters} 4 | import tracegen.{TraceGenSystem} 5 | import chipyard.{BuildSystem} 6 | import chipyard.clocking.{HasChipyardPRCI} 7 | 8 | class TraceGenTop(implicit p: Parameters) extends TraceGenSystem 9 | with HasChipyardPRCI 10 | 11 | class WithTracegenSystem extends Config((site, here, up) => { 12 | case BuildSystem => (p: Parameters) => new TraceGenTop()(p) 13 | }) 14 | 15 | -------------------------------------------------------------------------------- /generators/chipyard/src/main/scala/stage/ChipyardCli.scala: -------------------------------------------------------------------------------- 1 | // See LICENSE for license details. 2 | // Based on Rocket Chip's stage implementation 3 | 4 | package chipyard.stage 5 | 6 | import firrtl.options.Shell 7 | 8 | trait ChipyardCli { this: Shell => 9 | 10 | parser.note("Chipyard Generator Options") 11 | Seq( 12 | UnderscoreDelimitedConfigsAnnotation 13 | ).foreach(_.addOptions(parser)) 14 | } 15 | -------------------------------------------------------------------------------- /generators/chipyard/src/main/scala/unittest/TestHarness.scala: -------------------------------------------------------------------------------- 1 | package chipyard.unittest 2 | 3 | import chisel3._ 4 | import freechips.rocketchip.config.Parameters 5 | 6 | class TestHarness(implicit val p: Parameters) extends Module { 7 | val io = IO(new Bundle { val success = Output(Bool()) }) 8 | io.success := Module(new UnitTestSuite).io.finished 9 | } 10 | -------------------------------------------------------------------------------- /generators/chipyard/src/main/scala/unittest/UnitTestSuite.scala: -------------------------------------------------------------------------------- 1 | package chipyard.unittest 2 | 3 | import freechips.rocketchip.config.Parameters 4 | import freechips.rocketchip.util.{ElaborationArtefacts, PlusArgArtefacts} 5 | 6 | class UnitTestSuite(implicit p: Parameters) extends freechips.rocketchip.unittest.UnitTestSuite { 7 | ElaborationArtefacts.add("plusArgs", PlusArgArtefacts.serialize_cHeader) 8 | } 9 | -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/aeees/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !aeees.py 4 | !aeees_emu.py 5 | !aeees_gen.py 6 | !aeees_wb_gen.py 7 | !templates 8 | !README.md -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/aes/aes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-ll/CEP/bcc812336910a095e6cb48a50ac123872fdac93f/generators/mitll-blocks/src/main/resources/vsrc/aes/aes.pdf -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/auto-fir/.gitignore: -------------------------------------------------------------------------------- 1 | firgen.tgz 2 | synth-jan-14-2009.tar.gz 3 | parser.out 4 | parsetab.py 5 | firgen 6 | synth 7 | outputs 8 | transcript 9 | work 10 | __pycache__ 11 | *.firlog -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/generated_dsp_code/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/opentitan: -------------------------------------------------------------------------------- 1 | ../../../../../../opentitan/ -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/rsa/.gitignore: -------------------------------------------------------------------------------- 1 | obj_dir/ 2 | iverilog/ 3 | tb_sys.S 4 | tb_sys.bin 5 | tb_sys.vmem 6 | tb_sys -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/rsa/pem/pubkey.h: -------------------------------------------------------------------------------- 1 | int SPUB = 451; 2 | const char* FPUB = "-----BEGIN PUBLIC KEY-----\n\ 3 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAh4qW7bWym951XGVYwf15\n\ 4 | 3CPpWrbcjl7rsLH5kyH8jt1kEokqYAHDyCtVwfzo3rWQMrFabFrqG6hiVNqT/gWB\n\ 5 | As7gL9qvMKJWq39Avt2ZLnbn+AL+REC+sFZLxdlYGUJ8rp26HVUovMOSMZV6xraZ\n\ 6 | /Hc7Uki1qCVQmRi5GjeP2J7j7cw+qNCwolA/YD6u+vXZaW2ejol5QPR2vd6cF0cU\n\ 7 | X322l/DOtXt/mBKhB1Jc3rvY92oMxKQ1T7WBPsElx9nUiW9sTUvPluXLPFecUJVX\n\ 8 | MAl2yj2VLRXue9zOjH940R4nm/nMD/lWGdsiyjmM7HNp8UVHpunDbPpFaMn9EbxT\n\ 9 | fwIDAQAB\n\ 10 | -----END PUBLIC KEY-----\n"; 11 | 12 | -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/rsa/pem/pubkey.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAh4qW7bWym951XGVYwf15 3 | 3CPpWrbcjl7rsLH5kyH8jt1kEokqYAHDyCtVwfzo3rWQMrFabFrqG6hiVNqT/gWB 4 | As7gL9qvMKJWq39Avt2ZLnbn+AL+REC+sFZLxdlYGUJ8rp26HVUovMOSMZV6xraZ 5 | /Hc7Uki1qCVQmRi5GjeP2J7j7cw+qNCwolA/YD6u+vXZaW2ejol5QPR2vd6cF0cU 6 | X322l/DOtXt/mBKhB1Jc3rvY92oMxKQ1T7WBPsElx9nUiW9sTUvPluXLPFecUJVX 7 | MAl2yj2VLRXue9zOjH940R4nm/nMD/lWGdsiyjmM7HNp8UVHpunDbPpFaMn9EbxT 8 | fwIDAQAB 9 | -----END PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/rsa/pem/pubkey1.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAh4qW7bWym951XGVYwf15 3 | 3CPpWrbcjl7rsLH5kyH8jt1kEokqYAHDyCtVwfzo3rWQMrFabFrqG6hiVNqT/gWB 4 | As7gL9qvMKJWq39Avt2ZLnbn+AL+REC+sFZLxdlYGUJ8rp26HVUovMOSMZV6xraZ 5 | /Hc7Uki1qCVQmRi5GjeP2J7j7cw+qNCwolA/YD6u+vXZaW2ejol5QPR2vd6cF0cU 6 | X322l/DOtXt/mBKhB1Jc3rvY92oMxKQ1T7WBPsElx9nUiW9sTUvPluXLPFecUJVX 7 | MAl2yj2VLRXue9zOjH940R4nm/nMD/lWGdsiyjmM7HNp8UVHpunDbPpFaMn9EbxT 8 | fwIDAQAB 9 | -----END PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/rsa/pem/pubkey2.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBITANBgkqhkiG9w0BAQEFAAOCAQ4AMIIBCQKCAQBOIbs1DHkt6gYaD+H0ppkh 3 | XaSbRAxUKDcAYC0MbwXDlnNauAF4C0dFDUgxT9W+oSYQlbi5QWLApolwZ8kUvqqe 4 | kuRU+Ml5Nw/1Ql/PvRORgOg3K/lVljZtbvTritUIVyvWUZ0Vw/6tQV7/C6gYTtvF 5 | rAm0oT8dOr4uIaMC6+G/heC16+4Y4ZN3/IB9rhi8hlqT2GgCWtTcMMXNAkXgqOpr 6 | KBjiLZ2EQ3C6+8YS3uISFSh/Vjcp0zHeuQTcab6hu9p3zv6q2rWnOWUzTHOgFRYD 7 | 32qhEoTkZydYYzRNRqwqoc/yyR1eGMEYRsZRSuQo0KwIXDEEqN9IQff5X3Oi5bX/ 8 | AgMBAAE= 9 | -----END PUBLIC KEY----- 10 | 11 | -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/rsa/pem/pubkey3.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBITANBgkqhkiG9w0BAQEFAAOCAQ4AMIIBCQKCAQBlsHOVsOgLwcWfORHFjZSw 3 | FkS/8QPaVNDBRaYWxrPZYBZ9arSUUUrsTxtffwxIF2smB6xBhqkMYrzdsuVBIxtl 4 | p95yDpUmAZ4NyyeyPzJai8PaZ3RHK5Kigt1chwAi7l4ih6K7e4h5oxuwgh4iNJiM 5 | VFpq2zr/dVD91opnh9BbWMz9J/xeAkjAzDXcpbJqfPRht4nkX+ev7HNxZOz+ga32 6 | swhA7CLvZjjbXi8+Dmz67O8iY/9/36jRFwnJaHkwviZP//IEsTS2ESREjGhkT+Wf 7 | iFq143Fg6AgpRmFvAIYAyTE8tun8dqNeaewpxk4skgqnDEP0QjL6ZUfCguUURySz 8 | AgMBAAE= 9 | -----END PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/rsa/pem/pubkey4.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBITANBgkqhkiG9w0BAQEFAAOCAQ4AMIIBCQKCAQB3ZslIT6ccIMEffeCSu17g 3 | 0JOvVVZF1oMIbhlvrVz3qCOewO8YE+vcQ0iR5yAOqmdV4ARbw4/X/zAU7or16Cao 4 | /72/r72WvazSw9B0kNai4Jgofyg9UFH5sdBKNi6chAF7YQE7yJ9Y1sq5QnNIJzeq 5 | gLqs71ZYs42QKON46Sd1RaD2SCpcZfK4yLXE9gPdogKPZoswbsj6ywDPasn+G5t2 6 | 8A61ngyjemtWE8eXoplEoYzc/TmB3j/hrHKPVunP5QjPZvi99ghAyNuH8BHuOK3v 7 | ZdHBPmaAFsx/I+Uox2rUdiLUzxDjTKqesjISkwioNoJ9R2F0PmZ6A6MGPjZWAMtv 8 | AgMBAAE= 9 | -----END PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/rsa/src/ascii2hex.h: -------------------------------------------------------------------------------- 1 | /*Convert ASCII text to HEX format(64 32bits array), output to memory*/ 2 | void a2h(const char* TEXT, const int SIZE, uint32_t (*OUTPUT)[64]){ 3 | uint32_t BUF=0x00000000; 4 | int i=0, y=0; 5 | 6 | for(i=0; i<64*4; i++){ 7 | if(i 2 | #include 3 | 4 | #include "file.h" 5 | 6 | /*Store input from file */ 7 | int main(void) { 8 | char *string=""; 9 | int size=0; 10 | 11 | printf("-- Extracting File\r\n"); 12 | 13 | if(rFile(&string, &size, "./test/res"))exit(EXIT_FAILURE);//Extract data from file 14 | pString(string, size); //Print data from file 15 | wText(string, size, "./gen/output.txt"); //Store data in another file 16 | 17 | printf("\r\n-- COMPLETED\r\n"); 18 | return EXIT_SUCCESS; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/rsa/src/hex2ascii.h: -------------------------------------------------------------------------------- 1 | /*Convert HEX format(64 32bits array) to ASCII, output to memory*/ 2 | void h2a(uint32_t HEX[64], const int SIZE, char **OUTPUT){ 3 | uint32_t BUF=HEX[0]; 4 | int i=0, y=0; 5 | 6 | for(i=0; i>24; break; 9 | case 2:BUF=HEX[y]>>16; break; 10 | case 3:BUF=HEX[y]>>8; break; 11 | case 0:BUF=HEX[y]; y++; break; 12 | } 13 | (*OUTPUT)[i]=BUF; 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/rsa/test/exp: -------------------------------------------------------------------------------- 1 | 000000FF 2 | 00000000 3 | 00000000 4 | 00000000 5 | 00000000 6 | 00000000 7 | 00000000 8 | 00000000 9 | 00000000 10 | 00000000 11 | 00000000 12 | 00000000 13 | 00000000 14 | 00000000 15 | 00000000 16 | 00000000 17 | 00000000 18 | 00000000 19 | 00000000 20 | 00000000 21 | 00000000 22 | 00000000 23 | 00000000 24 | 00000000 25 | 00000000 26 | 00000000 27 | 00000000 28 | 00000000 29 | 00000000 30 | 00000000 31 | 00000000 32 | 00000000 33 | 00000000 34 | 00000000 35 | 00000000 36 | 00000000 37 | 00000000 38 | 00000000 39 | 00000000 40 | 00000000 41 | 00000000 42 | 00000000 43 | 00000000 44 | 00000000 45 | 00000000 46 | 00000000 47 | 00000000 48 | 00000000 49 | 00000000 50 | 00000000 51 | 00000000 52 | 00000000 53 | 00000000 54 | 00000000 55 | 00000000 56 | 00000000 57 | 00000000 58 | 00000000 59 | 00000000 60 | 00000000 61 | 00000000 62 | 00000000 63 | 00000000 64 | 00000000 65 | -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/rsa/test/mod: -------------------------------------------------------------------------------- 1 | 00000000 2 | 00000000 3 | 00000000 4 | 00000000 5 | 00000000 6 | 00000000 7 | 00000000 8 | 00000000 9 | 00000000 10 | 00000000 11 | 00000000 12 | 00000000 13 | 00000000 14 | 00000000 15 | 00000000 16 | 00000000 17 | 00000000 18 | 00000000 19 | 00000000 20 | 00000000 21 | 00000000 22 | 00000000 23 | 00000000 24 | 00000000 25 | 00000000 26 | 00000000 27 | 00000000 28 | 00000000 29 | 00000000 30 | 00000000 31 | 00000000 32 | 00000000 33 | 00000000 34 | 00000000 35 | 00000000 36 | 00000000 37 | 00000000 38 | 00000000 39 | 00000000 40 | 00000000 41 | 00000000 42 | 00000000 43 | 00000000 44 | 00000000 45 | 00000000 46 | 00000000 47 | 00000000 48 | 00000000 49 | FFFFFFFF 50 | FFFFFFFF 51 | FFFFFFFF 52 | FFFFFFFF 53 | FFFFFFFF 54 | FFFFFFFF 55 | FFFFFFFF 56 | FFFFFFFF 57 | FFFFFFFF 58 | FFFFFFFF 59 | FFFFFFFF 60 | FFFFFFFF 61 | FFFFFFFF 62 | FFFFFFFF 63 | FFFFFFFF 64 | FFFFFFFF 65 | -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/rsa/test/msg: -------------------------------------------------------------------------------- 1 | 00000000 2 | 00000000 3 | 00000000 4 | 00000000 5 | 00000000 6 | 00000000 7 | 00000000 8 | 00000000 9 | 00000000 10 | 00000000 11 | 00000000 12 | 00000000 13 | 00000000 14 | 00000000 15 | 00000000 16 | 00000000 17 | 00000000 18 | 00000000 19 | 00000000 20 | 00000000 21 | 00000000 22 | 00000000 23 | 00000000 24 | 00000000 25 | 00000000 26 | 00000000 27 | 00000000 28 | 00000000 29 | 00000000 30 | 00000000 31 | 00000000 32 | 00000000 33 | 00000000 34 | 00000000 35 | 00000000 36 | 00000000 37 | 00000000 38 | 00000000 39 | 00000000 40 | 00000000 41 | 00000000 42 | 00000000 43 | 00000000 44 | 00000000 45 | 00000000 46 | 00000000 47 | 00000000 48 | 00000000 49 | 00000000 50 | 00000000 51 | 00000000 52 | 00000000 53 | 00000000 54 | 00000000 55 | 00000000 56 | 00000000 57 | FFFFFFFF 58 | FFFFFFFF 59 | FFFFFFFF 60 | FFFFFFFF 61 | FFFFFFFF 62 | FFFFFFFF 63 | FFFFFFFF 64 | FFFFFFFF 65 | -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/rsa/test/res: -------------------------------------------------------------------------------- 1 | 00000000 2 | 00000000 3 | 00000000 4 | 00000000 5 | 00000000 6 | 00000000 7 | 00000000 8 | 00000000 9 | 00000000 10 | 00000000 11 | 00000000 12 | 00000000 13 | 00000000 14 | 00000000 15 | 00000000 16 | 00000000 17 | 00000000 18 | 00000000 19 | 00000000 20 | 00000000 21 | 00000000 22 | 00000000 23 | 00000000 24 | 00000000 25 | 00000000 26 | 00000000 27 | 00000000 28 | 00000000 29 | 00000000 30 | 00000000 31 | 00000000 32 | 00000000 33 | 00000000 34 | 00000000 35 | 00000000 36 | 00000000 37 | 00000000 38 | 00000000 39 | 00000000 40 | 00000000 41 | 00000000 42 | 00000000 43 | 00000000 44 | 00000000 45 | 00000000 46 | 00000000 47 | 00000000 48 | 00000000 49 | 3FFFFFFF 50 | FFFFFFFF 51 | FFFFFFFF 52 | FFFFFFFF 53 | FFFFFFFF 54 | FFFFFFFF 55 | FFFFFFFF 56 | FFFFFFFF 57 | c0000000 58 | 00000000 59 | 00000000 60 | 00000000 61 | 00000000 62 | 00000000 63 | 00000000 64 | 00000000 65 | -------------------------------------------------------------------------------- /generators/mitll-blocks/src/main/resources/vsrc/shaaa/templates/shaaa_stimulus.vt: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // 4 | // File Name: {MODULE_NAME}_stimulus.txt 5 | // Program: Common Evaluation Platform (CEP) 6 | // Description: {MODULE_NAME} Core unit testbench stimulus 7 | // Notes: 8 | // 9 | //************************************************************************ 10 | // column#1 : IN init 11 | // column#2 : IN next 12 | // column#3 : IN block[BLOCKSIZE-1:0] 13 | // column#5 : OUT exp_digest[DIGEST_SIZE-1:0] 14 | `define BLOCKSIZE_ {BLOCKSIZE} 15 | `define DIGEST_SIZE_ {DIGEST_BITS} 16 | `define SHAAA_DATA_WIDTH 2+`BLOCKSIZE_+`DIGEST_SIZE_ 17 | reg [`SHAAA_DATA_WIDTH-1:0] SHAAA_buffer[] = {{ 18 | 'h{SHAAA_STIMULUS_DATA} 19 | }}; 20 | `define SHAAA_SAMPLE_COUNT {SHAAA_STIMULUS_LENGTH} -------------------------------------------------------------------------------- /generators/tracegen/tracegen.mk: -------------------------------------------------------------------------------- 1 | ############################################################## 2 | # extra variables/targets ingested by the chipyard make system 3 | ############################################################## 4 | 5 | AXE_DIR=$(base_dir)/tools/axe/src 6 | AXE=$(AXE_DIR)/axe 7 | 8 | $(AXE): $(wildcard $(AXE_DIR)/*.[ch]) $(AXE_DIR)/make.sh 9 | cd $(AXE_DIR) && ./make.sh 10 | 11 | $(output_dir)/tracegen.out: $(SIM_PREREQ) 12 | mkdir -p $(output_dir) && $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) none $@ 13 | 14 | $(output_dir)/tracegen.result: $(output_dir)/tracegen.out $(AXE) 15 | $(base_dir)/scripts/check-tracegen.sh $< > $@ 16 | 17 | .PHONY: tracegen 18 | tracegen: $(output_dir)/tracegen.result 19 | -------------------------------------------------------------------------------- /project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.5.5 2 | -------------------------------------------------------------------------------- /project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0") 2 | addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.21") 3 | addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.11") 4 | -------------------------------------------------------------------------------- /scripts/add-githooks.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # adds githooks, expects to be run from base directory 4 | 5 | git config core.hooksPath .githooks 6 | -------------------------------------------------------------------------------- /scripts/build-openocd.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # exit script if any command fails 4 | set -e 5 | set -o pipefail 6 | 7 | RDIR=$(git rev-parse --show-toplevel) 8 | 9 | if [ -z "${RISCV}" ] ; then 10 | ! [ -r "${RDIR}/env.sh" ] || . "${RDIR}/env.sh" 11 | if [ -z "${RISCV}" ] ; then 12 | echo "${0}: set the RISCV environment variable to desired install path" 13 | exit 1 14 | fi 15 | fi 16 | 17 | SRCDIR="${RDIR}/toolchains/riscv-tools" 18 | . "${RDIR}/scripts/build-util.sh" 19 | 20 | git config --unset submodule.toolchains/riscv-tools/riscv-openocd.update || : 21 | module_prepare riscv-openocd 22 | module_run riscv-openocd ./bootstrap 23 | module_build riscv-openocd --prefix="${RISCV}" \ 24 | --enable-remote-bitbang --enable-jtag_vpi --disable-werror 25 | -------------------------------------------------------------------------------- /scripts/check-tracegen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | SCRIPT_DIR=$(dirname $0) 6 | AXE_DIR=$(realpath ${SCRIPT_DIR}/../tools/axe) 7 | ROCKET_DIR=$(realpath ${SCRIPT_DIR}/../generators/rocket-chip) 8 | 9 | TO_AXE=${ROCKET_DIR}/scripts/toaxe.py 10 | AXE=${AXE_DIR}/src/axe 11 | AXE_SHRINK=${AXE_DIR}/src/axe-shrink.py 12 | 13 | PATH=$PATH:${AXE_DIR}/src 14 | 15 | grep '.*:.*#.*@' $1 > /tmp/clean-trace.txt 16 | python2 "$TO_AXE" /tmp/clean-trace.txt > /tmp/trace.axe 17 | result=$("$AXE" check wmo /tmp/trace.axe) 18 | 19 | if [ "$result" != OK ]; then 20 | "$AXE_SHRINK" wmo /tmp/trace.axe 21 | else 22 | echo OK 23 | fi 24 | -------------------------------------------------------------------------------- /scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # used with the dockerfile to set up enviroment variables by running env.sh 4 | # adapted from https://stackoverflow.com/questions/55921914/how-to-source-a-script-with-environment-variables-in-a-docker-build-process 5 | 6 | . /root/chipyard/env.sh 7 | 8 | exec "$@" 9 | -------------------------------------------------------------------------------- /scripts/firesim-setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Sets up FireSim for use as a library within Chipyard 4 | 5 | set -e 6 | set -o pipefail 7 | 8 | RDIR=$(pwd) 9 | scripts_dir="$( cd "$( dirname "${BASH_SOURCE[0]:-${(%):-%x}}" )" >/dev/null 2>&1 && pwd )" 10 | 11 | cd "${scripts_dir}/.." 12 | 13 | # Reenable the FireSim submodule 14 | git config --unset submodule.sims/firesim.update || true 15 | cd sims/firesim 16 | ./build-setup.sh "$@" --library --skip-validate 17 | cd "$RDIR" 18 | -------------------------------------------------------------------------------- /scripts/gen-tags.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # run this script in the main Chipyard directory to generate ctags for all relevant repos 4 | # note: this requires exuberant-ctags 5 | # tested with: Exuberant Ctags 5.8 6 | # instructions: 7 | # cd /path/to/chipyard/ 8 | # ./scripts/gen-tags.sh 9 | # 10 | # input: 11 | # * nothing 12 | # 13 | # output: 14 | # * tags file in the directory that this was called in 15 | 16 | # ctags wrapper 17 | ctags -R --exclude=@.ctagsignore --links=no --languages=scala,C,C++,python 18 | -------------------------------------------------------------------------------- /scripts/init-fpga.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # exit script if any command fails 3 | set -e 4 | set -o pipefail 5 | 6 | # Enable submodule update for FPGA tools. 7 | git config --unset submodule.fpga/fpga-shells.update || : 8 | # Initialize local FPGA tools. 9 | git submodule update --init --recursive fpga/fpga-shells 10 | # Disable submodule update for FPGA tools. 11 | git config submodule.fpga/fpga-shells.update none 12 | -------------------------------------------------------------------------------- /scripts/init-software.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # exit script if any command fails 3 | set -e 4 | set -o pipefail 5 | 6 | # Enable submodule update for software submodules 7 | git config --unset submodule.software/nvdla-workload.update || : 8 | git config --unset submodule.software/coremark.update || : 9 | git config --unset submodule.software/spec2017.update || : 10 | 11 | # Initialize local software submodules 12 | git submodule update --init --recursive software/nvdla-workload 13 | git submodule update --init --recursive software/coremark 14 | git submodule update --init --recursive software/spec2017 15 | -------------------------------------------------------------------------------- /scripts/init-submodules-no-riscv-tools.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # wrapper to log output from init-submodules script 4 | 5 | set -e 6 | set -o pipefail 7 | 8 | RDIR=$(git rev-parse --show-toplevel) 9 | cd "$RDIR" 10 | 11 | ./scripts/init-submodules-no-riscv-tools-nolog.sh "$@" 2>&1 | tee init-submodules-no-riscv-tools.log 12 | -------------------------------------------------------------------------------- /scripts/init-vlsi.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # exit script if any command fails 3 | set -e 4 | set -o pipefail 5 | 6 | # Initialize HAMMER and CAD-plugins 7 | git submodule update --init --recursive vlsi/hammer 8 | git submodule update --init --recursive vlsi/hammer-cadence-plugins 9 | git submodule update --init --recursive vlsi/hammer-synopsys-plugins 10 | git submodule update --init --recursive vlsi/hammer-mentor-plugins 11 | 12 | # Initialize HAMMER tech plugin 13 | if [[ $1 != *asap7* ]] && [[ $1 != *sky130* ]]; then 14 | git submodule update --init --recursive vlsi/hammer-$1-plugin 15 | fi 16 | -------------------------------------------------------------------------------- /scripts/repo-clean.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # this should be run from chipyard repo top 6 | TOPDIR=$(pwd) 7 | 8 | cd generators/cva6/src/main/resources/vsrc 9 | git submodule deinit cva6 10 | 11 | cd $TOPDIR 12 | 13 | cd toolchains/qemu/roms/ 14 | git submodule deinit edk2 15 | cd ../ 16 | rm -rf build 17 | 18 | cd ../libgloss 19 | rm -rf build.log 20 | 21 | cd ../riscv-tools/riscv-isa-sim/ 22 | rm -rf build.log 23 | 24 | cd ../riscv-pk 25 | rm -rf build.log 26 | 27 | cd ../riscv-tests 28 | rm -rf build.log 29 | 30 | cd $TOPDIR 31 | cd tools/api-config-chipsalliance 32 | git config --local status.showUntrackedFiles no 33 | -------------------------------------------------------------------------------- /scripts/smartelf2hex.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script find the appropriate arguments to pass to elf2hex by inspecting the given RISC-V elf binary 4 | # First and only argument is the binary to be converted. 5 | # The output of this script should be redirected to a file (as with normal elf2hex). 6 | 7 | binary=$1 8 | segments=`readelf --segments --wide $binary` 9 | entry_hex=`echo -e "$segments" | grep "Entry point" | cut -f3 -d' ' | sed 's/0x//' | tr [:lower:] [:upper:]` 10 | entry_dec=`bc <<< "ibase=16;$entry_hex"` 11 | length_hex=`echo "$segments" | grep "LOAD\|TLS" | tail -n 1 | tr -s [:space:] | cut -f4,7 -d' '` 12 | length_dec=`echo $length_hex | tr -d x | tr [:lower:] [:upper:] | tr ' ' + | sed 's/^/ibase=16;/' | sed "s/$/-$entry_hex/" | bc` 13 | power_2_length=`echo "x=l($length_dec)/l(2); scale=0; 2^((x+1)/1)" | bc -l` 14 | width=64 15 | depth=$((power_2_length / width)) 16 | elf2hex $width $depth $binary $entry_dec 17 | -------------------------------------------------------------------------------- /scripts/tutorial-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e -x 4 | 5 | git rm generators/chipyard/src/main/scala/config/RocketSha3Configs.scala 6 | git rm -rf generators/sha3 7 | 8 | for p in scripts/tutorial-patches/*.patch 9 | do 10 | echo "Applying tutorial patch $p" 11 | git apply $p 12 | done 13 | -------------------------------------------------------------------------------- /sims/cep_cosim/.gitignore: -------------------------------------------------------------------------------- 1 | **/*.elf 2 | **/*.img 3 | lib/* 4 | *.log* 5 | *.jou 6 | *.elf 7 | *.bin 8 | **/*.o 9 | **/*.obj 10 | **/*.bobj 11 | **/*.hex 12 | **/*.a 13 | **/*.KEY 14 | **/status 15 | modelsim.ini* 16 | **/c_dispatch 17 | **/testHistory.txt 18 | vsim.do 19 | .c_children.mk 20 | **/transcript 21 | **/*.wlf 22 | **/*.dump 23 | include/cep_adrMap.h 24 | include/v2c_cmds.h 25 | generated-src/ 26 | CHIPYARD_BUILD_INFO.make 27 | **/*.rcf 28 | bootrom/.BOOTROM* -------------------------------------------------------------------------------- /sims/cep_cosim/bootrom/include/const.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | /* Derived from */ 3 | 4 | #ifndef _SIFIVE_CONST_H 5 | #define _SIFIVE_CONST_H 6 | 7 | #ifdef __ASSEMBLER__ 8 | #define _AC(X,Y) X 9 | #define _AT(T,X) X 10 | #else 11 | #define _AC(X,Y) (X##Y) 12 | #define _AT(T,X) ((T)(X)) 13 | #endif /* !__ASSEMBLER__*/ 14 | 15 | #define _BITUL(x) (_AC(1,UL) << (x)) 16 | #define _BITULL(x) (_AC(1,ULL) << (x)) 17 | 18 | #endif /* _SIFIVE_CONST_H */ 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/bootrom/include/devices/cepregs.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _CEPREGS_H 4 | #define _CEPREGS_H 5 | 6 | /* Register offsets */ 7 | #define CEPREGS_VERSION 0x0000 8 | #define CEPREGS_TESTNSET 0xFD10 9 | #define CEPREGS_SCRATCH_W0 0xFE00 10 | #define CEPREGS_SCRATCH_W1 0xFE08 11 | #define CEPREGS_SCRATCH_W2 0xFE10 12 | #define CEPREGS_SCRATCH_W3 0xFE18 13 | #define CEPREGS_SCRATCH_W4 0xFE20 14 | #define CEPREGS_SCRATCH_W5 0xFE28 15 | #define CEPREGS_SCRATCH_W6 0xFE30 16 | #define CEPREGS_SCRATCH_W7 0xFE38 17 | #define CEPREGS_CORE0_STATUS 0xFF00 18 | #define CEPREGS_CORE1_STATUS 0xFF08 19 | #define CEPREGS_CORE2_STATUS 0xFF10 20 | #define CEPREGS_CORE3_STATUS 0xFF18 21 | 22 | #endif /* _CEPREGS_H */ 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/bootrom/include/devices/clint.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_CLINT_H 4 | #define _SIFIVE_CLINT_H 5 | 6 | 7 | #define CLINT_MSIP 0x0000 8 | #define CLINT_MSIP_size 0x4 9 | #define CLINT_MTIMECMP 0x4000 10 | #define CLINT_MTIMECMP_size 0x8 11 | #define CLINT_MTIME 0xBFF8 12 | #define CLINT_MTIME_size 0x8 13 | 14 | #endif /* _SIFIVE_CLINT_H */ 15 | -------------------------------------------------------------------------------- /sims/cep_cosim/bootrom/include/devices/gpio.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_GPIO_H 4 | #define _SIFIVE_GPIO_H 5 | 6 | #define GPIO_INPUT_VAL (0x00) 7 | #define GPIO_INPUT_EN (0x04) 8 | #define GPIO_OUTPUT_EN (0x08) 9 | #define GPIO_OUTPUT_VAL (0x0C) 10 | #define GPIO_PULLUP_EN (0x10) 11 | #define GPIO_DRIVE (0x14) 12 | #define GPIO_RISE_IE (0x18) 13 | #define GPIO_RISE_IP (0x1C) 14 | #define GPIO_FALL_IE (0x20) 15 | #define GPIO_FALL_IP (0x24) 16 | #define GPIO_HIGH_IE (0x28) 17 | #define GPIO_HIGH_IP (0x2C) 18 | #define GPIO_LOW_IE (0x30) 19 | #define GPIO_LOW_IP (0x34) 20 | #define GPIO_IOF_EN (0x38) 21 | #define GPIO_IOF_SEL (0x3C) 22 | #define GPIO_OUTPUT_XOR (0x40) 23 | 24 | #endif /* _SIFIVE_GPIO_H */ 25 | -------------------------------------------------------------------------------- /sims/cep_cosim/bootrom/include/devices/uart.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_UART_H 4 | #define _SIFIVE_UART_H 5 | 6 | /* Register offsets */ 7 | #define UART_REG_TXFIFO 0x00 8 | #define UART_REG_RXFIFO 0x04 9 | #define UART_REG_TXCTRL 0x08 10 | #define UART_REG_RXCTRL 0x0c 11 | #define UART_REG_IE 0x10 12 | #define UART_REG_IP 0x14 13 | #define UART_REG_DIV 0x18 14 | 15 | /* TXCTRL register */ 16 | #define UART_TXEN 0x1 17 | #define UART_TXNSTOP 0x2 18 | #define UART_TXWM(x) (((x) & 0xffff) << 16) 19 | 20 | /* RXCTRL register */ 21 | #define UART_RXEN 0x1 22 | #define UART_RXWM(x) (((x) & 0xffff) << 16) 23 | 24 | /* IP register */ 25 | #define UART_IP_TXWM 0x1 26 | #define UART_IP_RXWM 0x2 27 | 28 | #endif /* _SIFIVE_UART_H */ 29 | -------------------------------------------------------------------------------- /sims/cep_cosim/bootrom/include/kprintf.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #ifndef _SDBOOT_KPRINTF_H 3 | #define _SDBOOT_KPRINTF_H 4 | 5 | #include 6 | #include 7 | 8 | #define REG32(p, i) ((p)[(i) >> 2]) 9 | 10 | #define UART_RXEMPTY (1 << 31) 11 | 12 | #ifndef UART_CTRL_ADDR 13 | #ifndef UART_NUM 14 | #define UART_NUM 0 15 | #endif 16 | 17 | #define _CONCAT3(A, B, C) A ## B ## C 18 | #define _UART_CTRL_ADDR(UART_NUM) _CONCAT3(UART, UART_NUM, _CTRL_ADDR) 19 | #define UART_CTRL_ADDR _UART_CTRL_ADDR(UART_NUM) 20 | #endif 21 | static volatile uint32_t * const uart = (void *)(UART_CTRL_ADDR); 22 | 23 | 24 | void kputc(int c); 25 | int kgetc(void); 26 | void kputs(const char *); 27 | 28 | #endif /* _SDBOOT_KPRINTF_H */ 29 | -------------------------------------------------------------------------------- /sims/cep_cosim/bootrom/include/sections.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #ifndef _SECTIONS_H 3 | #define _SECTIONS_H 4 | 5 | extern unsigned char _rom[]; 6 | extern unsigned char _rom_end[]; 7 | 8 | extern unsigned char _ram[]; 9 | extern unsigned char _ram_end[]; 10 | 11 | extern unsigned char _ftext[]; 12 | extern unsigned char _etext[]; 13 | extern unsigned char _fbss[]; 14 | extern unsigned char _ebss[]; 15 | extern unsigned char _end[]; 16 | 17 | #endif /* _SECTIONS_H */ 18 | -------------------------------------------------------------------------------- /sims/cep_cosim/bootrom/kprintf.c: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #include 3 | #include 4 | #include 5 | #include "kprintf.h" 6 | 7 | void kputc(int c) 8 | { 9 | #ifndef DISABLE_KPRINTF 10 | volatile uint32_t *tx = ®32(uart, UART_REG_TXFIFO); 11 | while ((int32_t)(*tx) < 0); 12 | *tx = (c & 0xFF); 13 | #endif 14 | } 15 | 16 | int kgetc(void) 17 | { 18 | #ifndef DISABLE_KPRINTF 19 | uint32_t ch; 20 | volatile uint32_t *rx = ®32(uart, UART_REG_RXFIFO); 21 | ch = *rx; 22 | 23 | if ((uint32_t)(ch & UART_RXEMPTY)) { 24 | return -1; 25 | } else { 26 | return(ch & 0x0ff); 27 | } 28 | #else 29 | return -1; 30 | #endif 31 | } 32 | 33 | void kputs(const char *s) 34 | { 35 | char c; 36 | while (*s != '\0') { 37 | c = *s; 38 | kputc((int) c); 39 | s++; 40 | } 41 | kputc('\r'); 42 | kputc('\n'); 43 | } -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/bare/include/bare_malloc.h: -------------------------------------------------------------------------------- 1 | // See LICENSE for license details. 2 | 3 | #ifndef BARE_MALLOC_H 4 | #define BARE_MALLOC_H 5 | 6 | #include 7 | 8 | // align to cache size 9 | typedef struct bareMalloc_st_ { 10 | uint64_t start_heap; 11 | uint64_t end_heap; 12 | uint64_t dummy[6]; 13 | } bareMalloc_t; 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | /* 20 | * Function Prototypes 21 | */ 22 | void* bare_malloc(uint32_t nbytes); 23 | void bare_free(void *ptr); 24 | 25 | // end of extern 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/bare/include/compiler.h: -------------------------------------------------------------------------------- 1 | #ifndef __COMPILER_H 2 | #define __COMPILER_H 3 | 4 | #ifdef __GNUC__ 5 | 6 | #ifndef __aligned 7 | #define __aligned(x) __attribute__ ((aligned (x))) 8 | #endif 9 | 10 | #else /* !__GNU_C__ */ 11 | #warning "Unknown compiler" 12 | 13 | #ifndef 14 | #define __aligned(x) 15 | #endif 16 | #endif 17 | 18 | #endif /* __COMPILER_H */ 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/bare/include/const.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | /* Derived from */ 3 | 4 | #ifndef _SIFIVE_CONST_H 5 | #define _SIFIVE_CONST_H 6 | 7 | #ifdef __ASSEMBLER__ 8 | #define _AC(X,Y) X 9 | #define _AT(T,X) X 10 | #else 11 | #define _AC(X,Y) (X##Y) 12 | #define _AT(T,X) ((T)(X)) 13 | #endif /* !__ASSEMBLER__*/ 14 | 15 | #define _BITUL(x) (_AC(1,UL) << (x)) 16 | #define _BITULL(x) (_AC(1,ULL) << (x)) 17 | 18 | #endif /* _SIFIVE_CONST_H */ 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/bare/include/devices/arty100t_gpio.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARTY100T_GPIO_H 2 | #define _ARTY100T_GPIO_H 3 | 4 | #define GPIO0_MASK (0x00000001) 5 | #define GPIO1_MASK (0x00000002) 6 | #define GPIO2_MASK (0x00000004) 7 | #define GPIO3_MASK (0x00000008) 8 | #define GPIO4_MASK (0x00000010) 9 | #define GPIO5_MASK (0x00000020) 10 | #define GPIO6_MASK (0x00000040) 11 | #define GPIO7_MASK (0x00000080) 12 | #define SW0_MASK (0x00000100) 13 | #define SW1_MASK (0x00000200) 14 | #define SW2_MASK (0x00000400) 15 | #define SW3_MASK (0x00000800) 16 | #define BTN0_MASK (0x00001000) 17 | #define BTN1_MASK (0x00002000) 18 | #define BTN2_MASK (0x00004000) 19 | #define BTN3_MASK (0x00008000) 20 | #define LED0_MASK (0x00010000) 21 | #define LED1_MASK (0x00020000) 22 | #define LED2_MASK (0x00040000) 23 | #define LED3_MASK (0x00080000) 24 | 25 | #endif /* _ARTY100T_GPIO_H */ 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/bare/include/devices/cepregs.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _CEPREGS_H 4 | #define _CEPREGS_H 5 | 6 | /* Register offsets */ 7 | #define CEPREGS_VERSION 0x0000 8 | #define CEPREGS_TESTNSET 0xFD10 9 | #define CEPREGS_SCRATCH_W0 0xFE00 10 | #define CEPREGS_SCRATCH_W1 0xFE08 11 | #define CEPREGS_SCRATCH_W2 0xFE10 12 | #define CEPREGS_SCRATCH_W3 0xFE18 13 | #define CEPREGS_SCRATCH_W4 0xFE20 14 | #define CEPREGS_SCRATCH_W5 0xFE28 15 | #define CEPREGS_SCRATCH_W6 0xFE30 16 | #define CEPREGS_SCRATCH_W7 0xFE38 17 | #define CEPREGS_CORE0_STATUS 0xFF00 18 | #define CEPREGS_CORE1_STATUS 0xFF08 19 | #define CEPREGS_CORE2_STATUS 0xFF10 20 | #define CEPREGS_CORE3_STATUS 0xFF18 21 | 22 | #endif /* _CEPREGS_H */ 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/bare/include/devices/clint.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_CLINT_H 4 | #define _SIFIVE_CLINT_H 5 | 6 | 7 | #define CLINT_MSIP 0x0000 8 | #define CLINT_MSIP_size 0x4 9 | #define CLINT_MTIMECMP 0x4000 10 | #define CLINT_MTIMECMP_size 0x8 11 | #define CLINT_MTIME 0xBFF8 12 | #define CLINT_MTIME_size 0x8 13 | 14 | #endif /* _SIFIVE_CLINT_H */ 15 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/bare/include/devices/gpio.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_GPIO_H 4 | #define _SIFIVE_GPIO_H 5 | 6 | #define GPIO_INPUT_VAL (0x00) 7 | #define GPIO_INPUT_EN (0x04) 8 | #define GPIO_OUTPUT_EN (0x08) 9 | #define GPIO_OUTPUT_VAL (0x0C) 10 | #define GPIO_PULLUP_EN (0x10) 11 | #define GPIO_DRIVE (0x14) 12 | #define GPIO_RISE_IE (0x18) 13 | #define GPIO_RISE_IP (0x1C) 14 | #define GPIO_FALL_IE (0x20) 15 | #define GPIO_FALL_IP (0x24) 16 | #define GPIO_HIGH_IE (0x28) 17 | #define GPIO_HIGH_IP (0x2C) 18 | #define GPIO_LOW_IE (0x30) 19 | #define GPIO_LOW_IP (0x34) 20 | #define GPIO_IOF_EN (0x38) 21 | #define GPIO_IOF_SEL (0x3C) 22 | #define GPIO_OUTPUT_XOR (0x40) 23 | 24 | #endif /* _SIFIVE_GPIO_H */ 25 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/bare/include/devices/uart.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_UART_H 4 | #define _SIFIVE_UART_H 5 | 6 | /* Register offsets */ 7 | #define UART_REG_TXFIFO 0x00 8 | #define UART_REG_RXFIFO 0x04 9 | #define UART_REG_TXCTRL 0x08 10 | #define UART_REG_RXCTRL 0x0c 11 | #define UART_REG_IE 0x10 12 | #define UART_REG_IP 0x14 13 | #define UART_REG_DIV 0x18 14 | 15 | /* TXCTRL register */ 16 | #define UART_TXEN 0x1 17 | #define UART_TXNSTOP 0x2 18 | #define UART_TXWM(x) (((x) & 0xffff) << 16) 19 | 20 | /* RXCTRL register */ 21 | #define UART_RXEN 0x1 22 | #define UART_RXWM(x) (((x) & 0xffff) << 16) 23 | 24 | /* IP register */ 25 | #define UART_IP_TXWM 0x1 26 | #define UART_IP_RXWM 0x2 27 | 28 | #endif /* _SIFIVE_UART_H */ 29 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/bare/include/kprintf.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #ifndef _SDBOOT_KPRINTF_H 3 | #define _SDBOOT_KPRINTF_H 4 | 5 | #include 6 | #include 7 | 8 | #define REG32(p, i) ((p)[(i) >> 2]) 9 | 10 | #define UART_RXEMPTY (1 << 31) 11 | 12 | #ifndef UART_CTRL_ADDR 13 | #ifndef UART_NUM 14 | #define UART_NUM 0 15 | #endif 16 | 17 | #define _CONCAT3(A, B, C) A ## B ## C 18 | #define _UART_CTRL_ADDR(UART_NUM) _CONCAT3(UART, UART_NUM, _CTRL_ADDR) 19 | #define UART_CTRL_ADDR _UART_CTRL_ADDR(UART_NUM) 20 | #endif 21 | static volatile uint32_t * const uart = (void *)(UART_CTRL_ADDR); 22 | 23 | 24 | void kputc(int c); 25 | int kgetc(void); 26 | void kputs(const char *); 27 | 28 | #endif /* _SDBOOT_KPRINTF_H */ 29 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/bare/kprintf.c: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #include 3 | #include 4 | #include 5 | #include "kprintf.h" 6 | 7 | void kputc(int c) 8 | { 9 | #ifndef DISABLE_KPRINTF 10 | volatile uint32_t *tx = ®32(uart, UART_REG_TXFIFO); 11 | while ((int32_t)(*tx) < 0); 12 | *tx = (c & 0xFF); 13 | #endif 14 | } 15 | 16 | int kgetc(void) 17 | { 18 | #ifndef DISABLE_KPRINTF 19 | uint32_t ch; 20 | volatile uint32_t *rx = ®32(uart, UART_REG_RXFIFO); 21 | ch = *rx; 22 | 23 | if ((uint32_t)(ch & UART_RXEMPTY)) { 24 | return -1; 25 | } else { 26 | return(ch & 0x0ff); 27 | } 28 | #else 29 | return -1; 30 | #endif 31 | } 32 | 33 | void kputs(const char *s) 34 | { 35 | char c; 36 | while (*s != '\0') { 37 | c = *s; 38 | kputc((int) c); 39 | s++; 40 | } 41 | kputc('\r'); 42 | kputc('\n'); 43 | } -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/cep_tests/Config.in: -------------------------------------------------------------------------------- 1 | #************************************************************************ 2 | # Copyright 2022 Massachusets Institute of Technology 3 | # 4 | # File Name: Config.in 5 | # Program: Common Evaluation Platform (CEP) 6 | # Description: Buildroot Config.in for CEP Regression Suite 7 | #************************************************************************ 8 | 9 | config BR2_PACKAGE_CEPREGRESSION 10 | bool "cepregression" 11 | help 12 | Linux port of the CEP regression suite. 13 | 14 | http://example.com 15 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/diag/cepAccessTest.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX License Identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | 12 | #ifndef cepAccessTest_H 13 | #define cepAccessTest_H 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | // 20 | // The test itself 21 | // 22 | int cepAccessTest_runTest(int cpuId, int seed, int verbose); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/diag/cepLockfreeAtomic.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX License Identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | 12 | #ifndef cepLockfreeAtomic_H 13 | #define cepLockfreeAtomic_H 14 | #include 15 | #include 16 | #include 17 | 18 | // 19 | // The test itself 20 | // 21 | int cepLockfreeAtomic_runTest(int cpuId, uint64_t mem_base, uint64_t reg_base, int seed, int verbose); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/diag/cepMacroMix.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX License Identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | 12 | #ifndef cepMacroMix_H 13 | #define cepMacroMix_H 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | int cepMacroMix_runTest(int cpuId, int cpuActiveMask, int coreMask, int seed, int verbose); 19 | int cepMacroMix_runBadKeysTest(int cpuId, int cpuActiveMask, int coreMask, int seed, int verbose); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/diag/cepMaskromTest.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX License Identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | 12 | #ifndef cepMaskromTest_H 13 | #define cepMaskromTest_H 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | // 20 | // The test itself 21 | // 22 | int cepMaskromTest_runTest(int cpuId, int seed, int verbose); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/diag/cepSrotMemTest.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX License Identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | 12 | #ifndef cepSrotMemTest_H 13 | #define cepSrotMemTest_H 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | // 20 | // The test itself 21 | // 22 | int cepSrotMemTest_runTest(int cpuId, int seed, int verbose); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/diag/cepSrotTest.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX License Identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | 12 | #ifndef cepSrotTest_H 13 | #define cepSrotTest_H 14 | 15 | #include 16 | #include 17 | #include 18 | #include "cep_crypto.h" 19 | 20 | // 21 | // The test itself 22 | // 23 | uint8_t send_srot_message(int verbose, uint64_t message); 24 | // 25 | int cepSrotTest_maxKeyTest(int cpuId, int verbose); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/diag/random48.h: -------------------------------------------------------------------------------- 1 | #ifndef Random48_H 2 | #define Random48_H 3 | 4 | 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | //#include 11 | #include "simdiag_global.h" 12 | 13 | // 14 | // random generator 15 | // 16 | extern void Random48_srand48(uint64_t seed); 17 | extern uint64_t Random48_mrand48 (void); 18 | extern int Random48_rand(void); 19 | extern uint64_t Random48_mrand48_custom (uint64_t *Random48_customDiagRandomNumber); 20 | 21 | #endif // RANDOM48_H 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/vectors/.NOT_EMPTY: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-ll/CEP/bcc812336910a095e6cb48a50ac123872fdac93f/sims/cep_cosim/drivers/vectors/.NOT_EMPTY -------------------------------------------------------------------------------- /sims/cep_cosim/drivers/virtual/link.ld: -------------------------------------------------------------------------------- 1 | OUTPUT_ARCH( "riscv" ) 2 | ENTRY(_start) 3 | 4 | SECTIONS 5 | { 6 | . = 0x80000000; 7 | .text.init : { *(.text.init) } 8 | . = ALIGN(0x1000); 9 | .tohost : { *(.tohost) } 10 | . = ALIGN(0x1000); 11 | .text : { *(.text) } 12 | . = ALIGN(0x1000); 13 | .data : { *(.data) } 14 | .bss : { *(.bss) } 15 | _end = .; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /sims/cep_cosim/dvt/spi_loopback.sv: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: spi_loopback.v 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | 12 | module spi_loopback 13 | ( 14 | // SPI Interface 15 | input SCK, 16 | output reg MISO, 17 | input MOSI, 18 | input CS_n 19 | ); 20 | 21 | initial MISO = 1'b1; 22 | always @(posedge SCK) begin 23 | if (!CS_n) MISO <= MOSI; 24 | else MISO <= 1'bz; 25 | end 26 | 27 | endmodule // spi_loopback 28 | -------------------------------------------------------------------------------- /sims/cep_cosim/dvt/v2c_top.incl: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: v2c_top.incl 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: SystemVerilog Logging support functions 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | 12 | `ifdef __V2C_TOP__ 13 | `else 14 | `define __V2C_TOP__ 15 | 16 | // Mapping of logging support functions 17 | `define logI $logI 18 | `define logE $logE 19 | `define logF $logF 20 | `define logW $logW 21 | `define logD if ($vpp_debug()) $logD 22 | 23 | `define logi $logI 24 | `define loge $logE 25 | `define logf $logF 26 | `define logw $logW 27 | `define logd if ($vpp_debug()) $logD 28 | 29 | // __V2C_TOP__ 30 | `endif 31 | -------------------------------------------------------------------------------- /sims/cep_cosim/pli/dpi_bitbang.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX License Identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | 12 | #ifndef DPI_BITBANG_H 13 | #define DPI_BITBANG_H 14 | 15 | #include 16 | #include 17 | 18 | extern "C" { 19 | int jtag_init(void) ; 20 | int jtag_quit(void); 21 | int jtag_getSocketPortId (void); 22 | int jtag_cmd(const int tdo_in, int *encode); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/share/share.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: share.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | 12 | #ifndef SHARE_H 13 | #define SHARE_H 14 | // --------------------------- 15 | 16 | //extern "C" { 17 | #ifdef SIM_ENV_ONLY 18 | 19 | #ifdef DLL_SIM 20 | #include "veriuser.h" 21 | #include "vpi_user.h" 22 | #include "acc_user.h" 23 | #include "log.h" 24 | #else 25 | #include "v2c_sys.h" 26 | #endif 27 | #endif 28 | 29 | 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/.gitignore: -------------------------------------------------------------------------------- 1 | .vmake_out 2 | searchPaths_build 3 | 4 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/accessTest/Makefile: -------------------------------------------------------------------------------- 1 | #//************************************************************************ 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File Name: Makefile 6 | #// Program: Common Evaluation Platform (CEP) 7 | #// Description: 8 | #// Notes: 9 | #// 10 | #//************************************************************************ 11 | 12 | COSIM_TOP_DIR = $(strip $(shell cd ../../..; pwd)) 13 | COSIM_BIN_DIR = $(COSIM_TOP_DIR)/bin 14 | REPO_TOP_DIR = $(strip $(shell cd ${COSIM_TOP_DIR}/../..; pwd)) 15 | TEST_SUITE_DIR = $(strip $(shell cd ..; pwd)) 16 | TEST_SUITE_NAME = $(shell cd ..; basename `pwd`) 17 | TEST_DIR = $(strip $(shell cd .; pwd)) 18 | TEST_NAME = $(shell cd .; basename `pwd`) 19 | 20 | # default target 21 | all: .vrun_flag 22 | 23 | # override anything here before calling the common file 24 | include ${TEST_SUITE_DIR}/common.make 25 | 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/accessTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/accessTest/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/aesMacro/Makefile: -------------------------------------------------------------------------------- 1 | #//************************************************************************ 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File Name: Makefile 6 | #// Program: Common Evaluation Platform (CEP) 7 | #// Description: 8 | #// Notes: 9 | #// 10 | #//************************************************************************ 11 | 12 | COSIM_TOP_DIR = $(strip $(shell cd ../../..; pwd)) 13 | COSIM_BIN_DIR = $(COSIM_TOP_DIR)/bin 14 | REPO_TOP_DIR = $(strip $(shell cd ${COSIM_TOP_DIR}/../..; pwd)) 15 | TEST_SUITE_DIR = $(strip $(shell cd ..; pwd)) 16 | TEST_SUITE_NAME = $(shell cd ..; basename `pwd`) 17 | TEST_DIR = $(strip $(shell cd .; pwd)) 18 | TEST_NAME = $(shell cd .; basename `pwd`) 19 | 20 | # default target 21 | all: .vrun_flag 22 | 23 | # override anything here before calling the common file 24 | include ${TEST_SUITE_DIR}/common.make 25 | 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/aesMacro/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/aesMacro/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/atomicOps/Makefile: -------------------------------------------------------------------------------- 1 | #//************************************************************************ 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File Name: Makefile 6 | #// Program: Common Evaluation Platform (CEP) 7 | #// Description: 8 | #// Notes: 9 | #// 10 | #//************************************************************************ 11 | 12 | COSIM_TOP_DIR = $(strip $(shell cd ../../..; pwd)) 13 | COSIM_BIN_DIR = $(COSIM_TOP_DIR)/bin 14 | REPO_TOP_DIR = $(strip $(shell cd ${COSIM_TOP_DIR}/../..; pwd)) 15 | TEST_SUITE_DIR = $(strip $(shell cd ..; pwd)) 16 | TEST_SUITE_NAME = $(shell cd ..; basename `pwd`) 17 | TEST_DIR = $(strip $(shell cd .; pwd)) 18 | TEST_NAME = $(shell cd .; basename `pwd`) 19 | 20 | # default target 21 | all: .vrun_flag 22 | 23 | # override anything here before calling the common file 24 | include ${TEST_SUITE_DIR}/common.make 25 | 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/atomicOps/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/atomicOps/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/cacheCoherence/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/cacheCoherence/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/clintIntr/Makefile: -------------------------------------------------------------------------------- 1 | #//************************************************************************ 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File Name: Makefile 6 | #// Program: Common Evaluation Platform (CEP) 7 | #// Description: 8 | #// Notes: 9 | #// 10 | #//************************************************************************ 11 | 12 | COSIM_TOP_DIR = $(strip $(shell cd ../../..; pwd)) 13 | COSIM_BIN_DIR = $(COSIM_TOP_DIR)/bin 14 | REPO_TOP_DIR = $(strip $(shell cd ${COSIM_TOP_DIR}/../..; pwd)) 15 | TEST_SUITE_DIR = $(strip $(shell cd ..; pwd)) 16 | TEST_SUITE_NAME = $(shell cd ..; basename `pwd`) 17 | TEST_DIR = $(strip $(shell cd .; pwd)) 18 | TEST_NAME = $(shell cd .; basename `pwd`) 19 | 20 | # default target 21 | all: .vrun_flag 22 | 23 | # override anything here before calling the common file 24 | include ${TEST_SUITE_DIR}/common.make 25 | 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/clintIntr/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/clintIntr/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/clintTest/Makefile: -------------------------------------------------------------------------------- 1 | #//************************************************************************ 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File Name: Makefile 6 | #// Program: Common Evaluation Platform (CEP) 7 | #// Description: 8 | #// Notes: 9 | #// 10 | #//************************************************************************ 11 | 12 | COSIM_TOP_DIR = $(strip $(shell cd ../../..; pwd)) 13 | COSIM_BIN_DIR = $(COSIM_TOP_DIR)/bin 14 | REPO_TOP_DIR = $(strip $(shell cd ${COSIM_TOP_DIR}/../..; pwd)) 15 | TEST_SUITE_DIR = $(strip $(shell cd ..; pwd)) 16 | TEST_SUITE_NAME = $(shell cd ..; basename `pwd`) 17 | TEST_DIR = $(strip $(shell cd .; pwd)) 18 | TEST_NAME = $(shell cd .; basename `pwd`) 19 | 20 | # default target 21 | all: .vrun_flag 22 | 23 | # override anything here before calling the common file 24 | include ${TEST_SUITE_DIR}/common.make 25 | 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/clintTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/clintTest/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/common.make: -------------------------------------------------------------------------------- 1 | #-------------------------------------------------------------------------------------- 2 | # Copyright 2022 Massachusets Institute of Technology 3 | # 4 | # File Name: common.make 5 | # Program: Common Evaluation Platform (CEP) 6 | # Description: common.make for bareMetalTests test suite 7 | # Notes: 8 | # 9 | #-------------------------------------------------------------------------------------- 10 | 11 | # override anything here before calling the top 12 | override DUT_SIM_MODE = BARE 13 | override ELF_MODE = LOCAL 14 | 15 | # Call root cosimulation common.make 16 | include ${COSIM_TOP_DIR}/common.make 17 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/csrTest/Makefile: -------------------------------------------------------------------------------- 1 | #//************************************************************************ 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File Name: Makefile 6 | #// Program: Common Evaluation Platform (CEP) 7 | #// Description: 8 | #// Notes: 9 | #// 10 | #//************************************************************************ 11 | 12 | COSIM_TOP_DIR = $(strip $(shell cd ../../..; pwd)) 13 | COSIM_BIN_DIR = $(COSIM_TOP_DIR)/bin 14 | REPO_TOP_DIR = $(strip $(shell cd ${COSIM_TOP_DIR}/../..; pwd)) 15 | TEST_SUITE_DIR = $(strip $(shell cd ..; pwd)) 16 | TEST_SUITE_NAME = $(shell cd ..; basename `pwd`) 17 | TEST_DIR = $(strip $(shell cd .; pwd)) 18 | TEST_NAME = $(shell cd .; basename `pwd`) 19 | 20 | # default target 21 | all: .vrun_flag 22 | 23 | # override anything here before calling the common file 24 | include ${TEST_SUITE_DIR}/common.make 25 | 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/csrTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/csrTest/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/extIntr/Makefile: -------------------------------------------------------------------------------- 1 | #//************************************************************************ 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File Name: Makefile 6 | #// Program: Common Evaluation Platform (CEP) 7 | #// Description: 8 | #// Notes: 9 | #// 10 | #//************************************************************************ 11 | 12 | COSIM_TOP_DIR = $(strip $(shell cd ../../..; pwd)) 13 | COSIM_BIN_DIR = $(COSIM_TOP_DIR)/bin 14 | REPO_TOP_DIR = $(strip $(shell cd ${COSIM_TOP_DIR}/../..; pwd)) 15 | TEST_SUITE_DIR = $(strip $(shell cd ..; pwd)) 16 | TEST_SUITE_NAME = $(shell cd ..; basename `pwd`) 17 | TEST_DIR = $(strip $(shell cd .; pwd)) 18 | TEST_NAME = $(shell cd .; basename `pwd`) 19 | 20 | # default target 21 | all: .vrun_flag 22 | 23 | # override anything here before calling the common file 24 | include ${TEST_SUITE_DIR}/common.make 25 | 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/extIntr/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/extIntr/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/fullBoot/Makefile: -------------------------------------------------------------------------------- 1 | #//************************************************************************ 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File Name: Makefile 6 | #// Program: Common Evaluation Platform (CEP) 7 | #// Description: 8 | #// Notes: 9 | #// 10 | #//************************************************************************ 11 | 12 | COSIM_TOP_DIR = $(strip $(shell cd ../../..; pwd)) 13 | COSIM_BIN_DIR = $(COSIM_TOP_DIR)/bin 14 | REPO_TOP_DIR = $(strip $(shell cd ${COSIM_TOP_DIR}/../..; pwd)) 15 | TEST_SUITE_DIR = $(strip $(shell cd ..; pwd)) 16 | TEST_SUITE_NAME = $(shell cd ..; basename `pwd`) 17 | TEST_DIR = $(strip $(shell cd .; pwd)) 18 | TEST_NAME = $(shell cd .; basename `pwd`) 19 | 20 | # default target 21 | all: .vrun_flag 22 | 23 | # override anything here before calling the common file 24 | include ${TEST_SUITE_DIR}/common.make 25 | 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/fullBoot/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/fullBoot/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/idcache_smc/Makefile: -------------------------------------------------------------------------------- 1 | #//************************************************************************ 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File Name: Makefile 6 | #// Program: Common Evaluation Platform (CEP) 7 | #// Description: 8 | #// Notes: 9 | #// 10 | #//************************************************************************ 11 | 12 | COSIM_TOP_DIR = $(strip $(shell cd ../../..; pwd)) 13 | COSIM_BIN_DIR = $(COSIM_TOP_DIR)/bin 14 | REPO_TOP_DIR = $(strip $(shell cd ${COSIM_TOP_DIR}/../..; pwd)) 15 | TEST_SUITE_DIR = $(strip $(shell cd ..; pwd)) 16 | TEST_SUITE_NAME = $(shell cd ..; basename `pwd`) 17 | TEST_DIR = $(strip $(shell cd .; pwd)) 18 | TEST_NAME = $(shell cd .; basename `pwd`) 19 | 20 | # default target 21 | all: .vrun_flag 22 | 23 | # override anything here before calling the common file 24 | include ${TEST_SUITE_DIR}/common.make 25 | 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/idcache_smc/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/idcache_smc/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/lockTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/lockTest/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/lockfreeAtomic/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/lockfreeAtomic/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/lrscOps/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/lrscOps/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/macro2Mix/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/macro2Mix/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/macro3Mix/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/macro3Mix/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/macro4Mix/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/macro4Mix/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/macroMix/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/macroMix/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/miscTests/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/miscTests/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/multiLock/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/multiLock/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/plicPrioIntr/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/plicPrioIntr/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/plicTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/plicTest/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/regTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/regTest/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/srotMemTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/srotMemTest/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bareMetalTests/suite_config.v: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // 4 | // File Name: suite_config.v 5 | // Program: Common Evaluation Platform (CEP) 6 | // Description: Testbench Defines for the Bare Metal Test Suite 7 | // Notes: 8 | // 9 | //-------------------------------------------------------------------------------------- 10 | `timescale 1ns/100ps 11 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/.gitignore: -------------------------------------------------------------------------------- 1 | .* 2 | bfmTests_work/* 3 | regressionSummary 4 | macroMix/BIO_OUT 5 | searchPaths_build 6 | 7 | !.gitignore 8 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/accessTest/Makefile: -------------------------------------------------------------------------------- 1 | #//************************************************************************ 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File Name: Makefile 6 | #// Program: Common Evaluation Platform (CEP) 7 | #// Description: 8 | #// Notes: 9 | #// 10 | #//************************************************************************ 11 | 12 | COSIM_TOP_DIR = $(strip $(shell cd ../../..; pwd)) 13 | COSIM_BIN_DIR = $(COSIM_TOP_DIR)/bin 14 | REPO_TOP_DIR = $(strip $(shell cd ${COSIM_TOP_DIR}/../..; pwd)) 15 | TEST_SUITE_DIR = $(strip $(shell cd ..; pwd)) 16 | TEST_SUITE_NAME = $(shell cd ..; basename `pwd`) 17 | TEST_DIR = $(strip $(shell cd .; pwd)) 18 | TEST_NAME = $(shell cd .; basename `pwd`) 19 | 20 | # default target 21 | all: .vrun_flag 22 | 23 | # override anything here before calling the common file 24 | include ${TEST_SUITE_DIR}/common.make 25 | 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/accessTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | 15 | // Dispatch setup 16 | #ifdef LONGTEST 17 | #define MAX_LOOP 50 18 | #else 19 | #define MAX_LOOP 5 20 | #endif 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/accessTest/c_module.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/clintTest/Makefile: -------------------------------------------------------------------------------- 1 | #//************************************************************************ 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File Name: Makefile 6 | #// Program: Common Evaluation Platform (CEP) 7 | #// Description: 8 | #// Notes: 9 | #// 10 | #//************************************************************************ 11 | 12 | COSIM_TOP_DIR = $(strip $(shell cd ../../..; pwd)) 13 | COSIM_BIN_DIR = $(COSIM_TOP_DIR)/bin 14 | REPO_TOP_DIR = $(strip $(shell cd ${COSIM_TOP_DIR}/../..; pwd)) 15 | TEST_SUITE_DIR = $(strip $(shell cd ..; pwd)) 16 | TEST_SUITE_NAME = $(shell cd ..; basename `pwd`) 17 | TEST_DIR = $(strip $(shell cd .; pwd)) 18 | TEST_NAME = $(shell cd .; basename `pwd`) 19 | 20 | # default target 21 | all: .vrun_flag 22 | 23 | # override anything here before calling the common file 24 | include ${TEST_SUITE_DIR}/common.make 25 | 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/clintTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | 15 | // Dispatch setup 16 | #ifdef LONGTEST 17 | #define MAX_LOOP 50 18 | #else 19 | #define MAX_LOOP 5 20 | #endif 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/clintTest/c_module.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/common.make: -------------------------------------------------------------------------------- 1 | #-------------------------------------------------------------------------------------- 2 | # Copyright 2022 Massachusets Institute of Technology 3 | # 4 | # File Name: common.make 5 | # Program: Common Evaluation Platform (CEP) 6 | # Description: common.make for bfmTests test suite 7 | # Notes: 8 | # 9 | #-------------------------------------------------------------------------------------- 10 | 11 | # override anything here before calling the top 12 | override DUT_SIM_MODE = BFM 13 | 14 | # Call root cosimulation common.make 15 | include ${COSIM_TOP_DIR}/common.make 16 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/lockTest/Makefile: -------------------------------------------------------------------------------- 1 | #//************************************************************************ 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File Name: Makefile 6 | #// Program: Common Evaluation Platform (CEP) 7 | #// Description: 8 | #// Notes: 9 | #// 10 | #//************************************************************************ 11 | 12 | COSIM_TOP_DIR = $(strip $(shell cd ../../..; pwd)) 13 | COSIM_BIN_DIR = $(COSIM_TOP_DIR)/bin 14 | REPO_TOP_DIR = $(strip $(shell cd ${COSIM_TOP_DIR}/../..; pwd)) 15 | TEST_SUITE_DIR = $(strip $(shell cd ..; pwd)) 16 | TEST_SUITE_NAME = $(shell cd ..; basename `pwd`) 17 | TEST_DIR = $(strip $(shell cd .; pwd)) 18 | TEST_NAME = $(shell cd .; basename `pwd`) 19 | 20 | # default target 21 | all: .vrun_flag 22 | 23 | # override anything here before calling the common file 24 | include ${TEST_SUITE_DIR}/common.make 25 | 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/lockTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/lockTest/c_module.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/macroMix/Makefile: -------------------------------------------------------------------------------- 1 | #//************************************************************************ 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File Name: Makefile 6 | #// Program: Common Evaluation Platform (CEP) 7 | #// Description: 8 | #// Notes: 9 | #// 10 | #//************************************************************************ 11 | 12 | COSIM_TOP_DIR = $(strip $(shell cd ../../..; pwd)) 13 | COSIM_BIN_DIR = $(COSIM_TOP_DIR)/bin 14 | REPO_TOP_DIR = $(strip $(shell cd ${COSIM_TOP_DIR}/../..; pwd)) 15 | TEST_SUITE_DIR = $(strip $(shell cd ..; pwd)) 16 | TEST_SUITE_NAME = $(shell cd ..; basename `pwd`) 17 | TEST_DIR = $(strip $(shell cd .; pwd)) 18 | TEST_NAME = $(shell cd .; basename `pwd`) 19 | 20 | # default target 21 | all: .vrun_flag 22 | 23 | # override anything here before calling the common file 24 | include ${TEST_SUITE_DIR}/common.make 25 | 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/macroMix/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX License Identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | 15 | // Dispatch setup 16 | #ifdef LONGTEST 17 | #define MAX_LOOP 50 18 | #else 19 | #define MAX_LOOP 5 20 | #endif 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/macroMix/c_module.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX License Identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/miscTests/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/miscTests/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | //************************************************************************ 12 | #ifndef c_module_H 13 | #define c_module_H 14 | 15 | #include "shPthread.h" 16 | 17 | void *c_module(void *); /* thread routine */ 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/multiLock/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | 15 | // Dispatch setup 16 | #ifdef LONGTEST 17 | #define MAX_LOOP 50 18 | #else 19 | #define MAX_LOOP 5 20 | #endif 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/multiLock/c_module.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/multiThread/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX License Identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | 15 | // Dispatch setup 16 | #ifdef LONGTEST 17 | #define MAX_LOOP 50 18 | #else 19 | #define MAX_LOOP 5 20 | #endif 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/multiThread/c_module.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX License Identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/plicPrioIntr/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/plicPrioIntr/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | //************************************************************************ 12 | #ifndef c_module_H 13 | #define c_module_H 14 | 15 | #include "shPthread.h" 16 | 17 | void *c_module(void *); /* thread routine */ 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/plicTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | 15 | // Dispatch setup 16 | #ifdef LONGTEST 17 | #define MAX_LOOP 50 18 | #else 19 | #define MAX_LOOP 5 20 | #endif 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/plicTest/c_module.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/regTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/regTest/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | //************************************************************************ 12 | #ifndef c_module_H 13 | #define c_module_H 14 | 15 | #include "shPthread.h" 16 | 17 | void *c_module(void *); /* thread routine */ 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/scratchpadTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/scratchpadTest/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | //************************************************************************ 12 | #ifndef c_module_H 13 | #define c_module_H 14 | 15 | #include "shPthread.h" 16 | 17 | void *c_module(void *); /* thread routine */ 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/srotBadKeys/.gitignore: -------------------------------------------------------------------------------- 1 | BIO_OUT 2 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/srotBadKeys/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX License Identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | 15 | // Dispatch setup 16 | #ifdef LONGTEST 17 | #define MAX_LOOP 50 18 | #else 19 | #define MAX_LOOP 5 20 | #endif 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/srotBadKeys/c_module.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX License Identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/srotErrorTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/srotErrorTest/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | //************************************************************************ 12 | #ifndef c_module_H 13 | #define c_module_H 14 | 15 | #include "shPthread.h" 16 | 17 | void *c_module(void *); /* thread routine */ 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/srotKeyTest/Makefile: -------------------------------------------------------------------------------- 1 | #//************************************************************************ 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File Name: Makefile 6 | #// Program: Common Evaluation Platform (CEP) 7 | #// Description: 8 | #// Notes: 9 | #// 10 | #//************************************************************************ 11 | 12 | COSIM_TOP_DIR = $(strip $(shell cd ../../..; pwd)) 13 | COSIM_BIN_DIR = $(COSIM_TOP_DIR)/bin 14 | REPO_TOP_DIR = $(strip $(shell cd ${COSIM_TOP_DIR}/../..; pwd)) 15 | TEST_SUITE_DIR = $(strip $(shell cd ..; pwd)) 16 | TEST_SUITE_NAME = $(shell cd ..; basename `pwd`) 17 | TEST_DIR = $(strip $(shell cd .; pwd)) 18 | TEST_NAME = $(shell cd .; basename `pwd`) 19 | 20 | # default target 21 | all: .vrun_flag 22 | 23 | # override anything here before calling the common file 24 | include ${TEST_SUITE_DIR}/common.make 25 | 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/srotKeyTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX License Identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | 15 | // Dispatch setup 16 | #ifdef LONGTEST 17 | #define MAX_LOOP 50 18 | #else 19 | #define MAX_LOOP 5 20 | #endif 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/srotKeyTest/c_module.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX License Identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/srotMemTest/Makefile: -------------------------------------------------------------------------------- 1 | #//************************************************************************ 2 | #// Copyright 2022 Massachusets Institute of Technology 3 | #// SPDX short identifier: BSD-2-Clause 4 | #// 5 | #// File Name: Makefile 6 | #// Program: Common Evaluation Platform (CEP) 7 | #// Description: 8 | #// Notes: 9 | #// 10 | #//************************************************************************ 11 | 12 | COSIM_TOP_DIR = $(strip $(shell cd ../../..; pwd)) 13 | COSIM_BIN_DIR = $(COSIM_TOP_DIR)/bin 14 | REPO_TOP_DIR = $(strip $(shell cd ${COSIM_TOP_DIR}/../..; pwd)) 15 | TEST_SUITE_DIR = $(strip $(shell cd ..; pwd)) 16 | TEST_SUITE_NAME = $(shell cd ..; basename `pwd`) 17 | TEST_DIR = $(strip $(shell cd .; pwd)) 18 | TEST_NAME = $(shell cd .; basename `pwd`) 19 | 20 | # default target 21 | all: .vrun_flag 22 | 23 | # override anything here before calling the common file 24 | include ${TEST_SUITE_DIR}/common.make 25 | 26 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/srotMemTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | 15 | // Dispatch setup 16 | #ifdef LONGTEST 17 | #define MAX_LOOP 50 18 | #else 19 | #define MAX_LOOP 5 20 | #endif 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/srotMemTest/c_module.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/bfmTests/suite_config.v: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // 4 | // File Name: suite_config.v 5 | // Program: Common Evaluation Platform (CEP) 6 | // Description: Testbench Defines for the BFM Test Suite 7 | // Notes: 8 | // 9 | //-------------------------------------------------------------------------------------- 10 | `timescale 1ns/100ps -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/isaTests/.gitignore: -------------------------------------------------------------------------------- 1 | rv64* 2 | .ISACreated -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/isaTests/common.make: -------------------------------------------------------------------------------- 1 | #-------------------------------------------------------------------------------------- 2 | # Copyright 2022 Massachusets Institute of Technology 3 | # 4 | # File Name: common.make 5 | # Program: Common Evaluation Platform (CEP) 6 | # Description: common.make for isaTests test suite 7 | # Notes: 8 | # 9 | #-------------------------------------------------------------------------------------- 10 | 11 | # override anything here before calling the top 12 | override DUT_SIM_MODE = BARE 13 | override RISCV_TESTS = 1 14 | 15 | ifeq (${NO_BUILTIN_ELF_MODE},1) 16 | override ELF_MODE = LOCAL 17 | else 18 | override ELF_MODE = BUILTIN 19 | endif 20 | 21 | # Call root cosimulation common.make 22 | include ${COSIM_TOP_DIR}/common.make 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/isaTests/dtmTest/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | 15 | // Dispatch setup 16 | #ifdef LONGTEST 17 | #define MAX_LOOP 50 18 | #else 19 | #define MAX_LOOP 5 20 | #endif 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/isaTests/dtmTest/c_module.h: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //************************************************************************ 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/isaTests/suite_config.v: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // 4 | // File Name: suite_config.v 5 | // Program: Common Evaluation Platform (CEP) 6 | // Description: Testbench Defines for the isa Test Suite 7 | // Notes: 8 | // 9 | //-------------------------------------------------------------------------------------- 10 | `timescale 1ns/100ps 11 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/isaTests/testTemplate/c_dispatch.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_dispatch.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef __C_DISPATCH_H 12 | #define __C_DISPATCH_H 13 | 14 | // Dispatch setup 15 | #ifdef LONGTEST 16 | #define MAX_LOOP 50 17 | #else 18 | #define MAX_LOOP 5 19 | #endif 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /sims/cep_cosim/testSuites/isaTests/testTemplate/c_module.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: c_module.h 6 | // Program: Common Evaluation Platform (CEP) 7 | // Description: 8 | // Notes: 9 | // 10 | //-------------------------------------------------------------------------------------- 11 | #ifndef c_module_H 12 | #define c_module_H 13 | 14 | #include "shPthread.h" 15 | 16 | void *c_module(void *); /* thread routine */ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sims/common-sim-flags.mk: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------------------------------- 2 | # common gcc configuration/optimization 3 | #---------------------------------------------------------------------------------------- 4 | SIM_OPT_CXXFLAGS := -O3 5 | 6 | SIM_CXXFLAGS = \ 7 | $(CXXFLAGS) \ 8 | $(SIM_OPT_CXXFLAGS) \ 9 | -std=c++11 \ 10 | -I$(RISCV)/include \ 11 | -I$(dramsim_dir) \ 12 | -I$(build_dir) \ 13 | $(EXTRA_SIM_CXXFLAGS) 14 | 15 | SIM_LDFLAGS = \ 16 | $(LDFLAGS) \ 17 | -L$(RISCV)/lib \ 18 | -Wl,--no-as-needed,-rpath,$(RISCV)/lib \ 19 | -L$(sim_dir) \ 20 | -L$(dramsim_dir) \ 21 | -lfesvr \ 22 | -ldramsim \ 23 | $(EXTRA_SIM_LDFLAGS) 24 | 25 | SIM_FILE_REQS += \ 26 | $(ROCKETCHIP_RSRCS_DIR)/vsrc/EICG_wrapper.v 27 | -------------------------------------------------------------------------------- /sims/vcs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !Makefile 4 | !dramsim2_ini 5 | -------------------------------------------------------------------------------- /sims/verilator/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !Makefile 4 | !verilator.mk 5 | !dramsim2_ini 6 | -------------------------------------------------------------------------------- /software/baremetal/gpiotest/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.dump 3 | *.elf 4 | *.img -------------------------------------------------------------------------------- /software/baremetal/gpiotest/include/compiler.h: -------------------------------------------------------------------------------- 1 | #ifndef __COMPILER_H 2 | #define __COMPILER_H 3 | 4 | #ifdef __GNUC__ 5 | 6 | #ifndef __aligned 7 | #define __aligned(x) __attribute__ ((aligned (x))) 8 | #endif 9 | 10 | #else /* !__GNU_C__ */ 11 | #warning "Unknown compiler" 12 | 13 | #ifndef 14 | #define __aligned(x) 15 | #endif 16 | #endif 17 | 18 | #endif /* __COMPILER_H */ 19 | -------------------------------------------------------------------------------- /software/baremetal/gpiotest/include/const.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | /* Derived from */ 3 | 4 | #ifndef _SIFIVE_CONST_H 5 | #define _SIFIVE_CONST_H 6 | 7 | #ifdef __ASSEMBLER__ 8 | #define _AC(X,Y) X 9 | #define _AT(T,X) X 10 | #else 11 | #define _AC(X,Y) (X##Y) 12 | #define _AT(T,X) ((T)(X)) 13 | #endif /* !__ASSEMBLER__*/ 14 | 15 | #define _BITUL(x) (_AC(1,UL) << (x)) 16 | #define _BITULL(x) (_AC(1,ULL) << (x)) 17 | 18 | #endif /* _SIFIVE_CONST_H */ 19 | -------------------------------------------------------------------------------- /software/baremetal/gpiotest/include/devices/cepregs.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _CEPREGS_H 4 | #define _CEPREGS_H 5 | 6 | /* Register offsets */ 7 | #define CEPREGS_VERSION 0x0000 8 | #define CEPREGS_TESTNSET 0xFD10 9 | #define CEPREGS_SCRATCH_W0 0xFE00 10 | #define CEPREGS_SCRATCH_W1 0xFE08 11 | #define CEPREGS_SCRATCH_W2 0xFE10 12 | #define CEPREGS_SCRATCH_W3 0xFE18 13 | #define CEPREGS_SCRATCH_W4 0xFE20 14 | #define CEPREGS_SCRATCH_W5 0xFE28 15 | #define CEPREGS_SCRATCH_W6 0xFE30 16 | #define CEPREGS_SCRATCH_W7 0xFE38 17 | #define CEPREGS_CORE0_STATUS 0xFF00 18 | #define CEPREGS_CORE1_STATUS 0xFF08 19 | #define CEPREGS_CORE2_STATUS 0xFF10 20 | #define CEPREGS_CORE3_STATUS 0xFF18 21 | 22 | #endif /* _CEPREGS_H */ 23 | -------------------------------------------------------------------------------- /software/baremetal/gpiotest/include/devices/clint.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_CLINT_H 4 | #define _SIFIVE_CLINT_H 5 | 6 | 7 | #define CLINT_MSIP 0x0000 8 | #define CLINT_MSIP_size 0x4 9 | #define CLINT_MTIMECMP 0x4000 10 | #define CLINT_MTIMECMP_size 0x8 11 | #define CLINT_MTIME 0xBFF8 12 | #define CLINT_MTIME_size 0x8 13 | 14 | #endif /* _SIFIVE_CLINT_H */ 15 | -------------------------------------------------------------------------------- /software/baremetal/gpiotest/include/devices/gpio.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_GPIO_H 4 | #define _SIFIVE_GPIO_H 5 | 6 | #define GPIO_INPUT_VAL (0x00) 7 | #define GPIO_INPUT_EN (0x04) 8 | #define GPIO_OUTPUT_EN (0x08) 9 | #define GPIO_OUTPUT_VAL (0x0C) 10 | #define GPIO_PULLUP_EN (0x10) 11 | #define GPIO_DRIVE (0x14) 12 | #define GPIO_RISE_IE (0x18) 13 | #define GPIO_RISE_IP (0x1C) 14 | #define GPIO_FALL_IE (0x20) 15 | #define GPIO_FALL_IP (0x24) 16 | #define GPIO_HIGH_IE (0x28) 17 | #define GPIO_HIGH_IP (0x2C) 18 | #define GPIO_LOW_IE (0x30) 19 | #define GPIO_LOW_IP (0x34) 20 | #define GPIO_IOF_EN (0x38) 21 | #define GPIO_IOF_SEL (0x3C) 22 | #define GPIO_OUTPUT_XOR (0x40) 23 | 24 | #endif /* _SIFIVE_GPIO_H */ 25 | -------------------------------------------------------------------------------- /software/baremetal/gpiotest/include/devices/uart.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_UART_H 4 | #define _SIFIVE_UART_H 5 | 6 | /* Register offsets */ 7 | #define UART_REG_TXFIFO 0x00 8 | #define UART_REG_RXFIFO 0x04 9 | #define UART_REG_TXCTRL 0x08 10 | #define UART_REG_RXCTRL 0x0c 11 | #define UART_REG_IE 0x10 12 | #define UART_REG_IP 0x14 13 | #define UART_REG_DIV 0x18 14 | 15 | /* TXCTRL register */ 16 | #define UART_TXEN 0x1 17 | #define UART_TXNSTOP 0x2 18 | #define UART_TXWM(x) (((x) & 0xffff) << 16) 19 | 20 | /* RXCTRL register */ 21 | #define UART_RXEN 0x1 22 | #define UART_RXWM(x) (((x) & 0xffff) << 16) 23 | 24 | /* IP register */ 25 | #define UART_IP_TXWM 0x1 26 | #define UART_IP_RXWM 0x2 27 | 28 | #endif /* _SIFIVE_UART_H */ 29 | -------------------------------------------------------------------------------- /software/baremetal/gpiotest/include/kprintf.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #ifndef _SDBOOT_KPRINTF_H 3 | #define _SDBOOT_KPRINTF_H 4 | 5 | #include 6 | #include 7 | 8 | #define REG32(p, i) ((p)[(i) >> 2]) 9 | 10 | #define UART_RXEMPTY (1 << 31) 11 | 12 | #ifndef UART_CTRL_ADDR 13 | #ifndef UART_NUM 14 | #define UART_NUM 0 15 | #endif 16 | 17 | #define _CONCAT3(A, B, C) A ## B ## C 18 | #define _UART_CTRL_ADDR(UART_NUM) _CONCAT3(UART, UART_NUM, _CTRL_ADDR) 19 | #define UART_CTRL_ADDR _UART_CTRL_ADDR(UART_NUM) 20 | #endif 21 | static volatile uint32_t * const uart = (void *)(UART_CTRL_ADDR); 22 | 23 | 24 | void kputc(int c); 25 | int kgetc(void); 26 | void kputs(const char *); 27 | 28 | #endif /* _SDBOOT_KPRINTF_H */ 29 | -------------------------------------------------------------------------------- /software/baremetal/gpiotest/kprintf.c: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #include 3 | #include 4 | #include 5 | #include "kprintf.h" 6 | 7 | void kputc(int c) 8 | { 9 | #ifndef DISABLE_KPRINTF 10 | volatile uint32_t *tx = ®32(uart, UART_REG_TXFIFO); 11 | while ((int32_t)(*tx) < 0); 12 | *tx = (c & 0xFF); 13 | #endif 14 | } 15 | 16 | int kgetc(void) 17 | { 18 | #ifndef DISABLE_KPRINTF 19 | uint32_t ch; 20 | volatile uint32_t *rx = ®32(uart, UART_REG_RXFIFO); 21 | ch = *rx; 22 | 23 | if ((uint32_t)(ch & UART_RXEMPTY)) { 24 | return -1; 25 | } else { 26 | return(ch & 0x0ff); 27 | } 28 | #else 29 | return -1; 30 | #endif 31 | } 32 | 33 | void kputs(const char *s) 34 | { 35 | char c; 36 | while (*s != '\0') { 37 | c = *s; 38 | kputc((int) c); 39 | s++; 40 | } 41 | kputc('\r'); 42 | kputc('\n'); 43 | } -------------------------------------------------------------------------------- /software/baremetal/hello_world/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.dump 3 | *.elf 4 | *.img -------------------------------------------------------------------------------- /software/baremetal/hello_world/hello_world.c: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: hello_world.c 6 | // Program: Common Evaluation Platform 7 | // Description: A basic bare-metal hello world program to run on the 8 | // RISC-V 9 | // Notes: 10 | // 11 | //************************************************************************ 12 | 13 | #include 14 | #include 15 | #include "encoding.h" 16 | #include "compiler.h" 17 | #include "kprintf.h" 18 | 19 | int main() { 20 | 21 | puts(""); 22 | puts(""); 23 | puts("-------------------------------"); 24 | puts(" Bare-Metal RISC-V Hello World "); 25 | puts("-------------------------------"); 26 | puts(""); 27 | puts(""); 28 | 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /software/baremetal/hello_world/include/compiler.h: -------------------------------------------------------------------------------- 1 | #ifndef __COMPILER_H 2 | #define __COMPILER_H 3 | 4 | #ifdef __GNUC__ 5 | 6 | #ifndef __aligned 7 | #define __aligned(x) __attribute__ ((aligned (x))) 8 | #endif 9 | 10 | #else /* !__GNU_C__ */ 11 | #warning "Unknown compiler" 12 | 13 | #ifndef 14 | #define __aligned(x) 15 | #endif 16 | #endif 17 | 18 | #endif /* __COMPILER_H */ 19 | -------------------------------------------------------------------------------- /software/baremetal/hello_world/include/const.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | /* Derived from */ 3 | 4 | #ifndef _SIFIVE_CONST_H 5 | #define _SIFIVE_CONST_H 6 | 7 | #ifdef __ASSEMBLER__ 8 | #define _AC(X,Y) X 9 | #define _AT(T,X) X 10 | #else 11 | #define _AC(X,Y) (X##Y) 12 | #define _AT(T,X) ((T)(X)) 13 | #endif /* !__ASSEMBLER__*/ 14 | 15 | #define _BITUL(x) (_AC(1,UL) << (x)) 16 | #define _BITULL(x) (_AC(1,ULL) << (x)) 17 | 18 | #endif /* _SIFIVE_CONST_H */ 19 | -------------------------------------------------------------------------------- /software/baremetal/hello_world/include/devices/arty100t_gpio.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARTY100T_GPIO_H 2 | #define _ARTY100T_GPIO_H 3 | 4 | #define GPIO0_MASK (0x00000001) 5 | #define GPIO1_MASK (0x00000002) 6 | #define GPIO2_MASK (0x00000004) 7 | #define GPIO3_MASK (0x00000008) 8 | #define GPIO4_MASK (0x00000010) 9 | #define GPIO5_MASK (0x00000020) 10 | #define GPIO6_MASK (0x00000040) 11 | #define GPIO7_MASK (0x00000080) 12 | #define SW0_MASK (0x00000100) 13 | #define SW1_MASK (0x00000200) 14 | #define SW2_MASK (0x00000400) 15 | #define SW3_MASK (0x00000800) 16 | #define BTN0_MASK (0x00001000) 17 | #define BTN1_MASK (0x00002000) 18 | #define BTN2_MASK (0x00004000) 19 | #define BTN3_MASK (0x00008000) 20 | #define LED0_MASK (0x00010000) 21 | #define LED1_MASK (0x00020000) 22 | #define LED2_MASK (0x00040000) 23 | #define LED3_MASK (0x00080000) 24 | 25 | #endif /* _ARTY100T_GPIO_H */ 26 | -------------------------------------------------------------------------------- /software/baremetal/hello_world/include/devices/cepregs.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _CEPREGS_H 4 | #define _CEPREGS_H 5 | 6 | /* Register offsets */ 7 | #define CEPREGS_VERSION 0x0000 8 | #define CEPREGS_TESTNSET 0xFD10 9 | #define CEPREGS_SCRATCH_W0 0xFE00 10 | #define CEPREGS_SCRATCH_W1 0xFE08 11 | #define CEPREGS_SCRATCH_W2 0xFE10 12 | #define CEPREGS_SCRATCH_W3 0xFE18 13 | #define CEPREGS_SCRATCH_W4 0xFE20 14 | #define CEPREGS_SCRATCH_W5 0xFE28 15 | #define CEPREGS_SCRATCH_W6 0xFE30 16 | #define CEPREGS_SCRATCH_W7 0xFE38 17 | #define CEPREGS_CORE0_STATUS 0xFF00 18 | #define CEPREGS_CORE1_STATUS 0xFF08 19 | #define CEPREGS_CORE2_STATUS 0xFF10 20 | #define CEPREGS_CORE3_STATUS 0xFF18 21 | 22 | #endif /* _CEPREGS_H */ 23 | -------------------------------------------------------------------------------- /software/baremetal/hello_world/include/devices/clint.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_CLINT_H 4 | #define _SIFIVE_CLINT_H 5 | 6 | 7 | #define CLINT_MSIP 0x0000 8 | #define CLINT_MSIP_size 0x4 9 | #define CLINT_MTIMECMP 0x4000 10 | #define CLINT_MTIMECMP_size 0x8 11 | #define CLINT_MTIME 0xBFF8 12 | #define CLINT_MTIME_size 0x8 13 | 14 | #endif /* _SIFIVE_CLINT_H */ 15 | -------------------------------------------------------------------------------- /software/baremetal/hello_world/include/devices/gpio.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_GPIO_H 4 | #define _SIFIVE_GPIO_H 5 | 6 | #define GPIO_INPUT_VAL (0x00) 7 | #define GPIO_INPUT_EN (0x04) 8 | #define GPIO_OUTPUT_EN (0x08) 9 | #define GPIO_OUTPUT_VAL (0x0C) 10 | #define GPIO_PULLUP_EN (0x10) 11 | #define GPIO_DRIVE (0x14) 12 | #define GPIO_RISE_IE (0x18) 13 | #define GPIO_RISE_IP (0x1C) 14 | #define GPIO_FALL_IE (0x20) 15 | #define GPIO_FALL_IP (0x24) 16 | #define GPIO_HIGH_IE (0x28) 17 | #define GPIO_HIGH_IP (0x2C) 18 | #define GPIO_LOW_IE (0x30) 19 | #define GPIO_LOW_IP (0x34) 20 | #define GPIO_IOF_EN (0x38) 21 | #define GPIO_IOF_SEL (0x3C) 22 | #define GPIO_OUTPUT_XOR (0x40) 23 | 24 | #endif /* _SIFIVE_GPIO_H */ 25 | -------------------------------------------------------------------------------- /software/baremetal/hello_world/include/devices/uart.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | 3 | #ifndef _SIFIVE_UART_H 4 | #define _SIFIVE_UART_H 5 | 6 | /* Register offsets */ 7 | #define UART_REG_TXFIFO 0x00 8 | #define UART_REG_RXFIFO 0x04 9 | #define UART_REG_TXCTRL 0x08 10 | #define UART_REG_RXCTRL 0x0c 11 | #define UART_REG_IE 0x10 12 | #define UART_REG_IP 0x14 13 | #define UART_REG_DIV 0x18 14 | 15 | /* TXCTRL register */ 16 | #define UART_TXEN 0x1 17 | #define UART_TXNSTOP 0x2 18 | #define UART_TXWM(x) (((x) & 0xffff) << 16) 19 | 20 | /* RXCTRL register */ 21 | #define UART_RXEN 0x1 22 | #define UART_RXWM(x) (((x) & 0xffff) << 16) 23 | 24 | /* IP register */ 25 | #define UART_IP_TXWM 0x1 26 | #define UART_IP_RXWM 0x2 27 | 28 | #endif /* _SIFIVE_UART_H */ 29 | -------------------------------------------------------------------------------- /software/baremetal/hello_world/include/kprintf.h: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #ifndef _SDBOOT_KPRINTF_H 3 | #define _SDBOOT_KPRINTF_H 4 | 5 | #include 6 | #include 7 | 8 | #define REG32(p, i) ((p)[(i) >> 2]) 9 | 10 | #define UART_RXEMPTY (1 << 31) 11 | 12 | #ifndef UART_CTRL_ADDR 13 | #ifndef UART_NUM 14 | #define UART_NUM 0 15 | #endif 16 | 17 | #define _CONCAT3(A, B, C) A ## B ## C 18 | #define _UART_CTRL_ADDR(UART_NUM) _CONCAT3(UART, UART_NUM, _CTRL_ADDR) 19 | #define UART_CTRL_ADDR _UART_CTRL_ADDR(UART_NUM) 20 | #endif 21 | static volatile uint32_t * const uart = (void *)(UART_CTRL_ADDR); 22 | 23 | 24 | void kputc(int c); 25 | int kgetc(void); 26 | void kputs(const char *); 27 | 28 | #endif /* _SDBOOT_KPRINTF_H */ 29 | -------------------------------------------------------------------------------- /software/baremetal/hello_world/kprintf.c: -------------------------------------------------------------------------------- 1 | // See LICENSE.Sifive for license details. 2 | #include 3 | #include 4 | #include 5 | #include "kprintf.h" 6 | 7 | void kputc(int c) 8 | { 9 | #ifndef DISABLE_KPRINTF 10 | volatile uint32_t *tx = ®32(uart, UART_REG_TXFIFO); 11 | while ((int32_t)(*tx) < 0); 12 | *tx = (c & 0xFF); 13 | #endif 14 | } 15 | 16 | int kgetc(void) 17 | { 18 | #ifndef DISABLE_KPRINTF 19 | uint32_t ch; 20 | volatile uint32_t *rx = ®32(uart, UART_REG_RXFIFO); 21 | ch = *rx; 22 | 23 | if ((uint32_t)(ch & UART_RXEMPTY)) { 24 | return -1; 25 | } else { 26 | return(ch & 0x0ff); 27 | } 28 | #else 29 | return -1; 30 | #endif 31 | } 32 | 33 | void kputs(const char *s) 34 | { 35 | char c; 36 | while (*s != '\0') { 37 | c = *s; 38 | kputc((int) c); 39 | s++; 40 | } 41 | kputc('\r'); 42 | kputc('\n'); 43 | } -------------------------------------------------------------------------------- /software/linux/gpiotest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #*********************************************************************** 2 | # Copyright 2022 Massachusets Institute of Technology 3 | # SPDX short identifier: BSD-2-Clause 4 | # 5 | # File Name: CMakeLists.txt 6 | # Program: Common Evaluation Platform (CEP) 7 | # Description: CMake file 8 | # Notes: 9 | #************************************************************************ 10 | cmake_minimum_required(VERSION 3.8) 11 | project(gpiotest C) 12 | set(CMAKE_C_STANDARD 11) 13 | 14 | add_executable(gpiotest gpiotest.c) 15 | 16 | target_include_directories(gpiotest PRIVATE) 17 | 18 | target_link_libraries(gpiotest PRIVATE "gpiod") 19 | 20 | set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Standard install prefix" FORCE) 21 | 22 | install(TARGETS gpiotest RUNTIME DESTINATION bin) -------------------------------------------------------------------------------- /software/linux/gpiotest/Config.in: -------------------------------------------------------------------------------- 1 | #*********************************************************************** 2 | # Copyright 2022 Massachusets Institute of Technology 3 | # SPDX short identifier: BSD-2-Clause 4 | # 5 | # File Name: Config.in 6 | # Program: Common Evaluation Platform (CEP) 7 | # Description: Buildroot configuration file for CEP linux application 8 | # Notes: 9 | #************************************************************************ 10 | 11 | config BR2_PACKAGE_GPIOTEST 12 | bool "gpiotest" 13 | depends on BR2_PACKAGE_LIBGPIOD 14 | help 15 | A linux port of the baremetal gpiotest program 16 | -------------------------------------------------------------------------------- /software/linux/gpiotest/gpiotest.mk: -------------------------------------------------------------------------------- 1 | #*********************************************************************** 2 | # Copyright 2022 Massachusets Institute of Technology 3 | # SPDX short identifier: BSD-2-Clause 4 | # 5 | # File Name: gpiotest.mk 6 | # Program: Common Evaluation Platform (CEP) 7 | # Description: Buildroot makefile 8 | # Notes: 9 | #************************************************************************ 10 | 11 | GPIOTEST_VERSION = 1.0.0 12 | GPIOTEST_LICENSE = BSD-2-Clause 13 | GPIOTEST_DEPENDENCIES = libgpiod 14 | GPIOTEST_SITE = $(TOPDIR)/../../../../../../linux/gpiotest 15 | GPIOTEST_SITE_METHOD = local 16 | GPIOTEST_INSTALL_STAGING = NO 17 | GPIOTEST_INSTALL_TARGET = YES 18 | 19 | $(eval $(cmake-package)) 20 | -------------------------------------------------------------------------------- /software/linux/helloworld/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #*********************************************************************** 2 | # Copyright 2022 Massachusets Institute of Technology 3 | # SPDX short identifier: BSD-2-Clause 4 | # 5 | # File Name: CMakeLists.txt 6 | # Program: Common Evaluation Platform (CEP) 7 | # Description: CMake file 8 | # Notes: 9 | #************************************************************************ 10 | cmake_minimum_required(VERSION 3.8) 11 | project(helloworld C) 12 | set(CMAKE_C_STANDARD 11) 13 | 14 | add_executable(helloworld helloworld.c) 15 | 16 | target_include_directories(helloworld PRIVATE) 17 | 18 | target_link_libraries(helloworld PRIVATE) 19 | 20 | set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Standard install prefix" FORCE) 21 | 22 | install(TARGETS helloworld RUNTIME DESTINATION bin) -------------------------------------------------------------------------------- /software/linux/helloworld/Config.in: -------------------------------------------------------------------------------- 1 | #*********************************************************************** 2 | # Copyright 2022 Massachusets Institute of Technology 3 | # SPDX short identifier: BSD-2-Clause 4 | # 5 | # File Name: Config.in 6 | # Program: Common Evaluation Platform (CEP) 7 | # Description: Buildroot configuration file for CEP linux application 8 | # Notes: 9 | #************************************************************************ 10 | 11 | config BR2_PACKAGE_HELLOWORLD 12 | bool "helloworld" 13 | help 14 | A simple hello world program 15 | -------------------------------------------------------------------------------- /software/linux/helloworld/helloworld.c: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // Copyright 2022 Massachusets Institute of Technology 3 | // SPDX short identifier: BSD-2-Clause 4 | // 5 | // File Name: hello_world.c 6 | // Program: Common Evaluation Platform 7 | // Description: A basic linux hello world program to run on the 8 | // RISC-V 9 | // Notes: 10 | // 11 | //************************************************************************ 12 | 13 | #include 14 | 15 | int main() { 16 | 17 | puts(""); 18 | puts(""); 19 | puts("--------------------------"); 20 | puts(" Linux RISC-V Hello World "); 21 | puts("--------------------------"); 22 | puts(""); 23 | puts(""); 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /software/linux/helloworld/helloworld.mk: -------------------------------------------------------------------------------- 1 | #************************************************************************ 2 | # Copyright 2022 Massachusets Institute of Technology 3 | # SPDX short identifier: BSD-2-Clause 4 | # 5 | # File Name: helloworld.mk 6 | # Program: Common Evaluation Platform (CEP) 7 | # Description: Buildroot makefile 8 | # Notes: 9 | #************************************************************************ 10 | 11 | HELLOWORLD_VERSION = 1.0.0 12 | HELLOWORLD_LICENSE = BSD-2-Clause 13 | HELLOWORLD_DEPENDENCIES = 14 | HELLOWORLD_SITE = $(TOPDIR)/../../../../../../linux/helloworld 15 | HELLOWORLD_SITE_METHOD = local 16 | HELLOWORLD_INSTALL_STAGING = NO 17 | HELLOWORLD_INSTALL_TARGET = YES 18 | 19 | $(eval $(cmake-package)) 20 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.riscv 3 | *.dump 4 | *.img 5 | libgloss/ 6 | -------------------------------------------------------------------------------- /tests/Makefile: -------------------------------------------------------------------------------- 1 | GCC=riscv64-unknown-elf-gcc 2 | OBJDUMP=riscv64-unknown-elf-objdump 3 | CFLAGS= -std=gnu99 -O2 -fno-common -fno-builtin-printf -Wall 4 | LDFLAGS= -static 5 | 6 | include libgloss.mk 7 | 8 | PROGRAMS = pwm blkdev accum charcount nic-loopback big-blkdev pingd \ 9 | streaming-passthrough streaming-fir nvdla spiflashread spiflashwrite fft 10 | 11 | spiflash.img: spiflash.py 12 | python3 $< 13 | 14 | .DEFAULT_GOAL := default 15 | 16 | .PHONY: default 17 | default: $(addsuffix .riscv,$(PROGRAMS)) spiflash.img 18 | 19 | .PHONY: dumps 20 | dumps: $(addsuffix .dump,$(PROGRAMS)) 21 | 22 | %.o: %.S 23 | $(GCC) $(CFLAGS) -D__ASSEMBLY__=1 -c $< -o $@ 24 | 25 | %.o: %.c mmio.h spiflash.h 26 | $(GCC) $(CFLAGS) -c $< -o $@ 27 | 28 | %.riscv: %.o $(libgloss) 29 | $(GCC) $(LDFLAGS) $< -o $@ 30 | 31 | %.dump: %.riscv 32 | $(OBJDUMP) -D $< > $@ 33 | 34 | 35 | .PHONY: clean 36 | clean: 37 | rm -f *.riscv *.o *.dump 38 | $(if $(libgloss),rm -rf $(libgloss_builddir)/) 39 | -------------------------------------------------------------------------------- /tests/accum.c: -------------------------------------------------------------------------------- 1 | #include "rocc.h" 2 | 3 | static inline void accum_write(int idx, unsigned long data) 4 | { 5 | ROCC_INSTRUCTION_SS(0, data, idx, 0); 6 | } 7 | 8 | static inline unsigned long accum_read(int idx) 9 | { 10 | unsigned long value; 11 | ROCC_INSTRUCTION_DSS(0, value, 0, idx, 1); 12 | return value; 13 | } 14 | 15 | static inline void accum_load(int idx, void *ptr) 16 | { 17 | asm volatile ("fence"); 18 | ROCC_INSTRUCTION_SS(0, (uintptr_t) ptr, idx, 2); 19 | } 20 | 21 | static inline void accum_add(int idx, unsigned long addend) 22 | { 23 | ROCC_INSTRUCTION_SS(0, addend, idx, 3); 24 | } 25 | 26 | unsigned long data = 0x3421L; 27 | 28 | int main(void) 29 | { 30 | unsigned long result; 31 | 32 | accum_load(0, &data); 33 | accum_add(0, 2); 34 | result = accum_read(0); 35 | 36 | if (result != data + 2) 37 | return 1; 38 | 39 | accum_write(0, 3); 40 | accum_add(0, 1); 41 | result = accum_read(0); 42 | 43 | if (result != 4) 44 | return 2; 45 | 46 | return 0; 47 | } 48 | -------------------------------------------------------------------------------- /tests/charcount.c: -------------------------------------------------------------------------------- 1 | #include "rocc.h" 2 | 3 | char string[64] __attribute__ ((aligned (64))) = "The quick brown fox jumped over the lazy dog"; 4 | 5 | static inline unsigned long count_chars(char *start, char needle) 6 | { 7 | unsigned long count; 8 | asm volatile ("fence"); 9 | ROCC_INSTRUCTION_DSS(2, count, start, needle, 0); 10 | return count; 11 | } 12 | 13 | int main(void) 14 | { 15 | unsigned long count = count_chars(string + 14, 'o'); 16 | if (count != 3) 17 | return count + 1; 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /tests/gcd.c: -------------------------------------------------------------------------------- 1 | #include "mmio.h" 2 | 3 | #define GCD_STATUS 0x2000 4 | #define GCD_X 0x2004 5 | #define GCD_Y 0x2008 6 | #define GCD_GCD 0x200C 7 | 8 | unsigned int gcd_ref(unsigned int x, unsigned int y) { 9 | while (y != 0) { 10 | if (x > y) 11 | x = x - y; 12 | else 13 | y = y - x; 14 | } 15 | return x; 16 | } 17 | 18 | // DOC include start: GCD test 19 | int main(void) 20 | { 21 | uint32_t result, ref, x = 20, y = 15; 22 | 23 | // wait for peripheral to be ready 24 | while ((reg_read8(GCD_STATUS) & 0x2) == 0) ; 25 | 26 | reg_write32(GCD_X, x); 27 | reg_write32(GCD_Y, y); 28 | 29 | 30 | // wait for peripheral to complete 31 | while ((reg_read8(GCD_STATUS) & 0x1) == 0) ; 32 | 33 | result = reg_read32(GCD_GCD); 34 | ref = gcd_ref(x, y); 35 | 36 | if (result != ref) { 37 | printf("Hardware result %d does not match reference value %d\n", result, ref); 38 | return 1; 39 | } 40 | return 0; 41 | } 42 | // DOC include end: GCD test 43 | -------------------------------------------------------------------------------- /tests/htif.ld: -------------------------------------------------------------------------------- 1 | ../toolchains/libgloss/util/htif.ld -------------------------------------------------------------------------------- /tests/pwm.c: -------------------------------------------------------------------------------- 1 | #define PWM_PERIOD 0x2000 2 | #define PWM_DUTY 0x2004 3 | #define PWM_ENABLE 0x2008 4 | 5 | #include "mmio.h" 6 | 7 | int main(void) 8 | { 9 | reg_write32(PWM_PERIOD, 20); 10 | reg_write32(PWM_DUTY, 5); 11 | reg_write32(PWM_ENABLE, 1); 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /tests/spiflash.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Generates a binary file that the SPI test uses 4 | 5 | outfile = "spiflash.img" 6 | 7 | with open(outfile, 'wb') as f: 8 | for i in range(0,0x100000,4): 9 | check = 0xdeadbeef - i 10 | f.write(check.to_bytes(4,'little')) 11 | 12 | -------------------------------------------------------------------------------- /tools/torture.mk: -------------------------------------------------------------------------------- 1 | HELP_COMMANDS += \ 2 | " torture = run torture on the RTL testbench" \ 3 | " torture-overnight = run torture overnight tests (set TORTURE_ONIGHT_OPTIONS to pass test options)" 4 | 5 | ######################################################################################### 6 | # run torture rules 7 | ######################################################################################### 8 | .PHONY: torture torture-overnight 9 | 10 | torture: $(output_dir) $(sim) 11 | $(MAKE) -C $(base_dir)/tools/torture/output clean 12 | $(MAKE) -C $(base_dir)/tools/torture R_SIM=$(sim) gen rtest 13 | cp -r $(base_dir)/tools/torture/output $(output_dir)/torture 14 | rm $(output_dir)/torture/Makefile 15 | 16 | TORTURE_ONIGHT_OPTIONS := 17 | torture-overnight: $(output_dir) $(sim) 18 | $(MAKE) -C $(base_dir)/tools/torture R_SIM=$(sim) OPTIONS="$(TORTURE_ONIGHT_OPTIONS)" rnight 19 | -------------------------------------------------------------------------------- /vlsi/.gitignore: -------------------------------------------------------------------------------- 1 | inputs.yml 2 | __pycache__ 3 | hammer*.log 4 | build 5 | src/test/output-*.json 6 | generated-src 7 | output.json 8 | -------------------------------------------------------------------------------- /vlsi/env.yml: -------------------------------------------------------------------------------- 1 | # Base path to where Mentor tools are installed 2 | mentor.mentor_home: "" 3 | # Mentor license server/file 4 | mentor.MGLS_LICENSE_FILE: "" 5 | # Base path to where Cadence tools are installed 6 | cadence.cadence_home: "" 7 | # Cadence license server/file 8 | cadence.CDS_LIC_FILE: "" 9 | # Base path to where Synopsys tools are installed 10 | synopsys.synopsys_home: "" 11 | # Synopsys license server/files 12 | synopsys.SNPSLMD_LICENSE_FILE: "" 13 | synopsys.MGLS_LICENSE_FILE: "" 14 | -------------------------------------------------------------------------------- /vlsi/example-openroad.yml: -------------------------------------------------------------------------------- 1 | # SRAM Compiler compiler options 2 | vlsi.core.sram_generator_tool: "sram_compiler" 3 | # You should specify a location for the SRAM generator in the tech plugin 4 | vlsi.core.sram_generator_tool_path: [] 5 | vlsi.core.sram_generator_tool_path_meta: "append" 6 | 7 | # Tool options. Replace with your tool plugin of choice. 8 | # Yosys options 9 | vlsi.core.synthesis_tool: "yosys" 10 | vlsi.core.synthesis_tool_path: ["hammer/src/hammer-vlsi/synthesis"] 11 | vlsi.core.synthesis_tool_path_meta: "append" 12 | # Innovus options 13 | vlsi.core.par_tool: "openroad" 14 | vlsi.core.par_tool_path: ["hammer/src/hammer-vlsi/par"] 15 | vlsi.core.par_tool_path_meta: "append" 16 | # Magic options 17 | vlsi.core.drc_tool: "magic" 18 | vlsi.core.drc_tool_path: ["hammer/src/hammer-vlsi/drc"] 19 | # Netgen options 20 | vlsi.core.lvs_tool: "netgen" 21 | vlsi.core.lvs_tool_path: ["hammer/src/hammer-vlsi/lvs"] 22 | -------------------------------------------------------------------------------- /vlsi/example-tech.yml: -------------------------------------------------------------------------------- 1 | # Technology Setup 2 | vlsi.core.technology: 3 | vlsi.core.technology_path: ["hammer--plugin"] 4 | vlsi.core.technology_path_meta: append 5 | 6 | # technology files installation directory 7 | technology..install_dir: "" 8 | -------------------------------------------------------------------------------- /vlsi/power.mk: -------------------------------------------------------------------------------- 1 | .PHONY: $(POWER_CONF) 2 | power-par: $(POWER_CONF) sim-par-debug 3 | power-par-$(VLSI_TOP): $(POWER_CONF) sim-par-debug-$(VLSI_TOP) 4 | power-par: override HAMMER_POWER_EXTRA_ARGS += -p $(POWER_CONF) 5 | power-par-$(VLSI_TOP): override HAMMER_POWER_EXTRA_ARGS += -p $(POWER_CONF) 6 | redo-power-par: $(POWER_CONF) 7 | redo-power-par-$(VLSI_TOP): $(POWER_CONF) 8 | redo-power-par: override HAMMER_EXTRA_ARGS += -p $(POWER_CONF) 9 | redo-power-par-$(VLSI_TOP): override HAMMER_EXTRA_ARGS += -p $(POWER_CONF) 10 | $(OBJ_DIR)/power-par-%/power-output-full.json: private override HAMMER_EXTRA_ARGS += $(HAMMER_POWER_EXTRA_ARGS) 11 | --------------------------------------------------------------------------------