Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sequencer committed May 13, 2022
1 parent bdefcd2 commit 4ae9287
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
1 change: 0 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ This repository always tracks remote developing branches, it may need some patch
chisel3 https://github.com/chipsalliance/chisel3/pull/2515
cva6-wrapper https://github.com/ucb-bar/cva6-wrapper/pull/15
rocket-chip https://github.com/chipsalliance/rocket-chip/pull/2968
rocket-chip https://github.com/chipsalliance/rocket-chip/pull/2810
block-inclusivecache-sifive https://github.com/sifive/block-inclusivecache-sifive/pull/22
chipyard https://github.com/ucb-bar/chipyard/pull/1160
fpga-shells https://github.com/sifive/fpga-shells/pull/162
Expand Down
20 changes: 20 additions & 0 deletions sanitytests/rocketchip/resources/vsrc/EICG_wrapper.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* verilator lint_off UNOPTFLAT */

module EICG_wrapper(
output out,
input en,
input test_en,
input in
);

reg en_latched /*verilator clock_enable*/;

always @(*) begin
if (!in) begin
en_latched = en || test_en;
end
end

assign out = en_latched && in;

endmodule
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ package sanitytests.rocketchip

import chipsalliance.rocketchip.config.Config
import freechips.rocketchip.devices.tilelink.BootROMLocated
import freechips.rocketchip.util.ClockGateModelFile
import os._

class TestBootRom
class TestConfig
extends Config((site, here, up) => {
case ClockGateModelFile => Some("/vsrc/EICG_wrapper.v")
case BootROMLocated(x) =>
up(BootROMLocated(x), site).map(_.copy(contentFileName = {
val tmp = os.temp.dir()
Expand Down
2 changes: 1 addition & 1 deletion sanitytests/rocketchip/src/VerilatorTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object VerilatorTest extends TestSuite {
val tests = Tests {
test("build TestHarness emulator") {
val testHarness = classOf[freechips.rocketchip.system.TestHarness]
val configs = Seq(classOf[TestBootRom], classOf[freechips.rocketchip.system.DefaultConfig])
val configs = Seq(classOf[TestConfig], classOf[freechips.rocketchip.system.DefaultConfig])
val emulator = TestHarness(testHarness, configs, Some(outputDirectory)).emulator
test("build hello") {
os.proc(
Expand Down

0 comments on commit 4ae9287

Please sign in to comment.