compare test pass
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package MAC
|
||||
|
||||
import chisel3._
|
||||
import chisel3.util
|
||||
import chisel3.util._
|
||||
|
||||
class MDIO extends Bundle{
|
||||
val mdi = Input( Bool()) // MII Management Data In
|
||||
@@ -11,208 +11,221 @@ class MDIO extends Bundle{
|
||||
}
|
||||
|
||||
class MIIMIO extends MDIO{
|
||||
val CtrlData = Input( UInt(16.W) ) // Control Data (to be written to the PHY reg.)
|
||||
val Rgad = Input(UInt(5.W)) // Register Address (within the PHY)
|
||||
val Fiad = Input( UInt(5.W) ) // PHY Address
|
||||
val Divider = Input( UInt(8.W) ) // Divider for the host clock // Divider (input clock will be divided by the Divider[7:0])
|
||||
val NoPre = Input(Bool()) // No Preamble (no 32-bit preamble)
|
||||
|
||||
val WCtrlData = Input(Bool()) // Write Control Data operation
|
||||
val CtrlData = Input( UInt(16.W) ) // Control Data (to be written to the PHY reg.)
|
||||
|
||||
val Fiad = Input( UInt(5.W) ) // PHY Address
|
||||
val Rgad = Input(UInt(5.W)) // Register Address (within the PHY)
|
||||
|
||||
val RStat = Input( Bool() ) // Read Status operation
|
||||
|
||||
val ScanStat = Input( Bool() ) // Scan Status operation
|
||||
|
||||
val Busy = Output(Bool()) // Busy Signal
|
||||
val LinkFail = Output(Bool()) // Link Integrity Signal
|
||||
val Nvalid = Output(Bool()) // Invalid Status (qualifier for the valid scan result)
|
||||
val Prsd = Output(UInt(16.W)) // Read Status Data (data read from the PHY)
|
||||
|
||||
val WCtrlDataStart = Output(Bool()) // This signals resets the WCTRLDATA bit in the MIIM Command register
|
||||
val RStatStart = Output(Bool()) // This signal resets the RSTAT BIT in the MIIM Command register
|
||||
val UpdateMIIRX_DATAReg = Output(Bool()) // Updates MII RX_DATA register with read data
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
class MIIMBase extends Module{
|
||||
val io: MIIMIO = IO(new MIIMIO)
|
||||
}
|
||||
|
||||
/** Connecting the Clock Generator Module */
|
||||
trait MIIMClockGen{ this: MIIMBase =>
|
||||
val Divider = Wire( UInt(8.W) ) // Divider for the host clock // Divider (input clock will be divided by the Divider[7:0])
|
||||
|
||||
|
||||
val TempDivider = Mux( Divider < 2.U, 2.U, Divider ) // If smaller than 2
|
||||
val CounterPreset = ( TempDivider >> 1 ) - 1.U // We are counting half of period
|
||||
val ByteSelect = Wire( Vec( 4, Bool() ) ) // Byte Select defines which byte (preamble, data, operation, etc.) is loaded and shifted through the shift register.
|
||||
|
||||
|
||||
// Counter counts half period
|
||||
val Counter = RegInit( 1.U(8.W) )
|
||||
val Mdc = RegInit(false.B) // Output clock
|
||||
val CountEq0 = Counter === 0.U
|
||||
val MdcEn = CountEq0 & ~Mdc; // Enable signal is asserted for one Clk period before Mdc rises.
|
||||
val MdcEn_n = CountEq0 & Mdc; // Enable signal is asserted for one Clk period before Mdc falls.
|
||||
val mdc = RegInit(false.B) // Output clock
|
||||
val mdcEn = (Counter === 0.U) & ~mdc // Enable signal is asserted for one Clk period before mdc rises.
|
||||
val mdcEn_n = (Counter === 0.U) & mdc // Enable signal is asserted for one Clk period before mdc falls.
|
||||
|
||||
when( CountEq0 ) {
|
||||
val ShiftReg = RegInit(0.U(8.W)) // Shift register for shifting the data in and out
|
||||
val Prsd = RegInit(0.U(16.W))
|
||||
val LinkFail = RegInit(false.B)
|
||||
|
||||
|
||||
val BitCounter = RegInit( 0.U(7.W) ) // Bit Counter counts from 0 to 63 (from 32 to 63 when NoPre is asserted)
|
||||
val EndOp = BitCounter === 63.U // Operation ends when the Bit Counter reaches 63
|
||||
|
||||
|
||||
val InProgress = RegInit(false.B) // Operation in progress
|
||||
val InProgress_q = ShiftRegisters(InProgress, 3, false.B, mdcEn) // Operation in progress delayed 3 mdc cycles
|
||||
val EndBusy = ShiftRegister(~InProgress_q(1) & InProgress_q(2), 2, false.B, true.B) // Generation of the EndBusy signal. It is used for ending the MII Management operation.
|
||||
|
||||
val WriteOp = RegInit(false.B) // Write Operation Latch (When asserted, write operation is in progress)
|
||||
|
||||
|
||||
|
||||
|
||||
io.mdc := mdc
|
||||
io.LinkFail := LinkFail
|
||||
io.Prsd := Prsd
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/** Connecting the Clock Generator Module */
|
||||
trait MIIMClockGen{ this: MIIMBase =>
|
||||
|
||||
val TempDivider = Mux( io.Divider < 2.U, 2.U, io.Divider ) // If smaller than 2
|
||||
val CounterPreset = ( TempDivider >> 1 ) - 1.U // We are counting half of period
|
||||
|
||||
when( Counter === 0.U ) {
|
||||
mdc := ~mdc // mdc is asserted every other half period
|
||||
Counter := CounterPreset
|
||||
} .otherwise{
|
||||
Counter := Counter - 1.U
|
||||
}
|
||||
|
||||
// Mdc is asserted every other half period
|
||||
when(CountEq0) {
|
||||
Mdc := ~Mdc
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
trait MIIMShiftReg{ this: MIIMBase =>
|
||||
|
||||
val ShiftReg = RegInit(0.U(8.W)) // Shift register for shifting the data in and out
|
||||
val Prsd = RegInit(0.U(16.W))
|
||||
val LinkFail = RegInit(false.B)
|
||||
|
||||
when(MdcEn_n){
|
||||
when(|ByteSelect) {
|
||||
/* verilator lint_off CASEINCOMPLETE */
|
||||
val LatchByte0 = ShiftRegister(InProgress & ~WriteOp & BitCounter === "h3F".U, 2, false.B, mdcEn) // Latch Byte selects which part of Read Status Data is updated from the shift register
|
||||
val LatchByte1 = ShiftRegister(InProgress & ~WriteOp & BitCounter === "h37".U, 2, false.B, mdcEn) // Latch Byte selects which part of Read Status Data is updated from the shift register
|
||||
|
||||
ByteSelect(0) := InProgress & ((io.NoPre & (BitCounter === 0.U)) | (~io.NoPre & (BitCounter === "h20".U)));
|
||||
ByteSelect(1) := InProgress & (BitCounter === "h28".U);
|
||||
ByteSelect(2) := InProgress & WriteOp & (BitCounter === "h30".U);
|
||||
ByteSelect(3) := InProgress & WriteOp & (BitCounter === "h38".U);
|
||||
|
||||
when(mdcEn_n){
|
||||
when(ByteSelect.reduce(_|_)) {
|
||||
ShiftReg := Mux1H(Seq(
|
||||
ByteSelect === "h1".U -> Cat("b01".U(2.W), ~WriteOp, WriteOp, Fiad(4,1)),
|
||||
ByteSelect === "h2".U -> Cat(Fiad.extract(0), Rgad(4,0), "b01".U(2.W)),
|
||||
ByteSelect === "h4".U -> CtrlData(15,8),
|
||||
ByteSelect === "h8".U -> CtrlData( 7,0),
|
||||
ByteSelect(0) -> Cat("b01".U(2.W), ~WriteOp, WriteOp, io.Fiad(4,1)),
|
||||
ByteSelect(1) -> Cat(io.Fiad.extract(0), io.Rgad(4,0), "b10".U(2.W)),
|
||||
ByteSelect(2) -> io.CtrlData(15,8),
|
||||
ByteSelect(3) -> io.CtrlData( 7,0),
|
||||
))
|
||||
} .otherwise{
|
||||
ShiftReg := Cat(ShiftReg(6,0), Mdi)
|
||||
when(LatchByte.extract(0)){
|
||||
Prsd := Cat(Prsd(15,8), ShiftReg(6,0), Mdi)
|
||||
when(Rgad === 1.U){
|
||||
ShiftReg := Cat(ShiftReg(6,0), io.mdi)
|
||||
when(LatchByte0){
|
||||
Prsd := Cat(Prsd(15,8), ShiftReg(6,0), io.mdi)
|
||||
when(io.Rgad === 1.U){
|
||||
LinkFail := ~ShiftReg.extract(1) // this is bit [2], because it is not shifted yet
|
||||
}
|
||||
} .elsewhen(LatchByte.extract(1)){
|
||||
Prsd := Cat(ShiftReg(6:0), Mdi, Prsd(7,0))
|
||||
} .elsewhen(LatchByte1){
|
||||
Prsd := Cat(ShiftReg(6,0), io.mdi, Prsd(7,0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val ShiftedBit = ShiftReg.extract(7) // This bit is output of the shift register and is connected to the Mdo signal
|
||||
|
||||
}
|
||||
|
||||
trait MIIMOutputCtl{ this: MIIMBase =>
|
||||
|
||||
// Generation of the Serial Enable signal (enables the serialization of the data)
|
||||
val SerialEn = WriteOp & InProgress & ( BitCounter > 31.U | ( ( BitCounter === 0.U ) & NoPre ) )
|
||||
| ~WriteOp & InProgress & (( BitCounter > 31.U & BitCounter < 46.U ) | ( ( BitCounter === 0.U ) & NoPre ))
|
||||
|
||||
val MdoEn = ShiftRegisters( SerialEn | InProgress & BitCounter<32.U, 3, false.B, en = MdcEn_n)
|
||||
val Mdo_2d = RegEnable( ~SerialEn & BitCounter<32.U, false.B, MdcEn_n)
|
||||
val Mdo_d = RegEnable( ShiftedBit | Mdo_2d, false.B, MdcEn_n)
|
||||
val Mdo = RegEnable( Mdo_d, false.B, MdcEn_n)
|
||||
|
||||
|
||||
|
||||
|
||||
// Generation of the Serial Enable signal (enables the serialization of the data)
|
||||
val SerialEn = ( WriteOp & InProgress & ( BitCounter > 31.U | ( ( BitCounter === 0.U ) & io.NoPre ) )) |
|
||||
(~WriteOp & InProgress & (( BitCounter > 31.U & BitCounter < 46.U ) | ( ( BitCounter === 0.U ) & io.NoPre )))
|
||||
|
||||
val mdoEn = ShiftRegister( SerialEn | (InProgress & BitCounter<32.U), 3, false.B, mdcEn_n)
|
||||
val mdo_2d = RegEnable( ~SerialEn & BitCounter<32.U, false.B, mdcEn_n)
|
||||
val mdo_d = RegEnable( ShiftReg.extract(7) | mdo_2d, false.B, mdcEn_n)
|
||||
val mdo = RegEnable( mdo_d, false.B, mdcEn_n)
|
||||
io.mdo := mdo
|
||||
io.mdoEn := mdoEn
|
||||
|
||||
}
|
||||
|
||||
|
||||
trait MIIM { this: MIIMBase =>
|
||||
class MIIM extends MIIMBase with MIIMClockGen with MIIMShiftReg with MIIMOutputCtl{
|
||||
|
||||
val WCtrlData_q = ShiftRegisters(io.WCtrlData, 3, false.B, true.B)
|
||||
val WCtrlDataStart = RegInit(false.B) // Start Write Control Data Command (positive edge detected)
|
||||
val WCtrlDataStart_q = ShiftRegisters(WCtrlDataStart, 2, false.B, mdcEn) // Start Write Control Data Command delayed 2 mdc cycle
|
||||
val WriteDataOp = WCtrlDataStart_q(0) & ~WCtrlDataStart_q(1) // Write Data Operation (positive edge detected)
|
||||
io.WCtrlDataStart := WCtrlDataStart
|
||||
|
||||
// Generation of the Operation signals
|
||||
|
||||
|
||||
// Generation of the EndBusy signal. It is used for ending the MII Management operation.
|
||||
val EndBusy_d = RegNext(false.B, ~InProgress_q2 & InProgress_q3)
|
||||
val EndBusy = RegInit(false.B, EndBusy_d)
|
||||
|
||||
val StartOp = Wire(Bool()) // Start Operation (start of any of the preceding operations)
|
||||
|
||||
|
||||
|
||||
// Update MII RX_DATA register
|
||||
val UpdateMIIRX_DATAReg = RegInit(false.B, EndBusy & ~WCtrlDataStart_q) // Updates MII RX_DATA register with read data
|
||||
|
||||
|
||||
|
||||
|
||||
// Generation of the delayed signals used for positive edge triggering.
|
||||
val WCtrlData_q = ShiftRegisters(WCtrlData, 3, false.B, en = true.B)
|
||||
val RStat_q = ShiftRegisters(RStat, 3, false.B, en = true.B)
|
||||
val ScanStat_q = ShiftRegisters(ScanStat, 2, false.B, en = true.B)
|
||||
val SyncStatMdcEn = RegEnable(ScanStat_q(1), false.B, enable = MdcEn) // Scan Status operation delayed at least cycles and synchronized to MdcEn
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Generation of the Start Commands (Write Control Data or Read Status)
|
||||
val WCtrlDataStart = RegInit(false.B) // Start Write Control Data Command (positive edge detected)
|
||||
val WCtrlDataStart_q = RegEnable(WCtrlDataStart, false.B, enable= ~EndBusy)
|
||||
val RStatStart = RegInit(false.B) // Start Read Status Command (positive edge detected)
|
||||
|
||||
when( EndBusy ){
|
||||
WCtrlDataStart := false.B
|
||||
} .elsewhen( WCtrlData_q(1) & ~WCtrlData_q(2) ){
|
||||
WCtrlDataStart := true.B
|
||||
}
|
||||
|
||||
// Update MII RX_DATA register
|
||||
val WCtrlDataStart_q0 = RegEnable(WCtrlDataStart, false.B, ~EndBusy)
|
||||
val UpdateMIIRX_DATAReg = RegNext(EndBusy & ~WCtrlDataStart_q0, false.B) // Updates MII RX_DATA register with read data
|
||||
io.UpdateMIIRX_DATAReg := UpdateMIIRX_DATAReg
|
||||
|
||||
|
||||
|
||||
val RStat_q = ShiftRegisters(io.RStat, 3, false.B, true.B)
|
||||
val RStatStart = RegInit(false.B) // Start Read Status Command (positive edge detected)
|
||||
val RStatStart_q = ShiftRegisters(RStatStart, 2, false.B, mdcEn) // Start Read Status Command delayed 2 mdc cycles
|
||||
val ReadStatusOp = RStatStart_q(0) & ~RStatStart_q(1) // Read Status Operation (positive edge detected)
|
||||
io.RStatStart := RStatStart
|
||||
|
||||
when( EndBusy ){
|
||||
RStatStart := false.B
|
||||
} .otherwise{
|
||||
when( WCtrlData_q(1) & ~WCtrlData_q(2) ){
|
||||
WCtrlDataStart := true.B
|
||||
}
|
||||
when(RStat_q(1) & ~RStat_q(2)){
|
||||
RStatStart := true.B
|
||||
} .elsewhen(RStat_q(1) & ~RStat_q(2)){
|
||||
RStatStart := true.B
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
when(mdcEn){
|
||||
when(StartOp) {
|
||||
InProgress := true.B
|
||||
} .elsewhen(EndOp) {
|
||||
InProgress := false.B
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Generation of the Nvalid signal (indicates when the status is invalid)
|
||||
val Nvalid = RegInit(false.B)
|
||||
when( ~InProgress_q2 & InProgress_q3 ) {
|
||||
val ScanStat_q = ShiftRegisters(io.ScanStat, 2, false.B, true.B)
|
||||
val SyncStatmdcEn = RegEnable(ScanStat_q(1), false.B, mdcEn) // Scan Status operation delayed at least cycles and synchronized to mdcEn
|
||||
val ScanStatusOp = SyncStatmdcEn & ~InProgress & ~InProgress_q(0) & ~InProgress_q(1) // Scan Status Operation (positive edge detected)
|
||||
|
||||
|
||||
val Nvalid = RegInit(false.B) // Generation of the Nvalid signal (indicates when the status is invalid)
|
||||
io.Nvalid := Nvalid
|
||||
|
||||
when( ~InProgress_q(1) & InProgress_q(2) ) {
|
||||
Nvalid := false.B
|
||||
} .elsewhen(ScanStat_q2 & ~SyncStatMdcEn) {
|
||||
} .elsewhen(ScanStat_q(1) & ~SyncStatmdcEn) {
|
||||
Nvalid := true.B
|
||||
}
|
||||
|
||||
|
||||
// Signals used for the generation of the Operation signals (positive edge)
|
||||
|
||||
val WCtrlDataStart_q = ShiftRegisters(WCtrlDataStart, 2, false.B, en: MdcEn) // Start Write Control Data Command delayed 2 Mdc cycle
|
||||
val RStatStart_q = ShiftRegisters(RStatStart, 2, false.B, en: MdcEn) // Start Read Status Command delayed 2 Mdc cycles
|
||||
val InProgress_q = ShiftRegisters(InProgress, 3, false.B, en: MdcEn) // Operation in progress delayed 3 Mdc cycles
|
||||
val LatchByte0 = ShiftRegisters(InProgress & ~WriteOp & BitCounter == "h3F".U, 2, false.B, MdcEn) // Latch Byte selects which part of Read Status Data is updated from the shift register
|
||||
val LatchByte1 = ShiftRegisters(InProgress & ~WriteOp & BitCounter == "h37".U, 2, false.B, MdcEn) // Latch Byte selects which part of Read Status Data is updated from the shift register
|
||||
val LatchByte = Cat( LatchByte1, LatchByte0 ) // Latch Byte selects which part of Read Status Data is updated from the shift register
|
||||
|
||||
|
||||
|
||||
// Generation of the Operation signals
|
||||
val WriteDataOp = WCtrlDataStart_q(0) & ~WCtrlDataStart_q(1) // Write Data Operation (positive edge detected)
|
||||
val ReadStatusOp = RStatStart_q(0) & ~RStatStart_q(1) // Read Status Operation (positive edge detected)
|
||||
val ScanStatusOp = SyncStatMdcEn & ~InProgress & ~InProgress_q(0) & ~InProgress_q(1) // Scan Status Operation (positive edge detected)
|
||||
val StartOp = WriteDataOp | ReadStatusOp | ScanStatusOp // Start Operation (start of any of the preceding operations)
|
||||
|
||||
// Busy
|
||||
val Busy = WCtrlData | WCtrlDataStart | RStat | RStatStart | SyncStatMdcEn | EndBusy | InProgress | InProgress_q3 | Nvalid;
|
||||
|
||||
|
||||
// Generation of the InProgress signal (indicates when an operation is in progress)
|
||||
// Generation of the WriteOp signal (indicates when a write is in progress)
|
||||
val InProgress = RegInit(false.B) // Operation in progress
|
||||
val WriteOp = RegInit(false.B) // Write Operation Latch (When asserted, write operation is in progress)
|
||||
|
||||
when(MdcEn){
|
||||
when(mdcEn){
|
||||
when(StartOp) {
|
||||
InProgress := true.B
|
||||
when( ~InProgress ){
|
||||
WriteOp := WriteDataOp
|
||||
WriteOp := Mux( WriteDataOp, true.B, false.B )
|
||||
}
|
||||
} .elsewhen(EndOp) {
|
||||
InProgress := false.B
|
||||
WriteOp := false.B
|
||||
}
|
||||
}
|
||||
|
||||
// Bit Counter counts from 0 to 63 (from 32 to 63 when NoPre is asserted)
|
||||
val BitCounter = RegInit( 0.U(7.W) ) // Bit Counter
|
||||
|
||||
when( MdcEn ){
|
||||
when( mdcEn ){
|
||||
when( InProgress ) {
|
||||
when( NoPre & BitCounter === 0.U ) {
|
||||
when( io.NoPre & BitCounter === 0.U ) {
|
||||
BitCounter := "h21".U
|
||||
} .otherwise {
|
||||
BitCounter := BitCounter + 1.U
|
||||
@@ -222,13 +235,10 @@ trait MIIM { this: MIIMBase =>
|
||||
}
|
||||
}
|
||||
|
||||
// Operation ends when the Bit Counter reaches 63
|
||||
val EndOp = BitCounter === 63.U // End of Operation
|
||||
val ByteSelect = Wire( Vec( 4, Bool() ) ) // Byte Select defines which byte (preamble, data, operation, etc.) is loaded and shifted through the shift register.
|
||||
|
||||
ByteSelect(0) := InProgress & ((NoPre & (BitCounter === 0.U)) | (~NoPre & (BitCounter === "h20".U)));
|
||||
ByteSelect(1) := InProgress & (BitCounter === "h28".U);
|
||||
ByteSelect(2) := InProgress & WriteOp & (BitCounter === "h30".U);
|
||||
ByteSelect(3) := InProgress & WriteOp & (BitCounter === "h38".U);
|
||||
StartOp := WriteDataOp | ReadStatusOp | ScanStatusOp
|
||||
io.Busy := io.WCtrlData | WCtrlDataStart | io.RStat | RStatStart | SyncStatmdcEn | EndBusy | InProgress | InProgress_q(2) | Nvalid
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
// See README.md for license details.
|
||||
|
||||
package gcd
|
||||
|
||||
import chisel3._
|
||||
import chiseltest._
|
||||
import org.scalatest.freespec.AnyFreeSpec
|
||||
import chisel3.experimental.BundleLiterals._
|
||||
|
||||
/**
|
||||
* This is a trivial example of how to run this Specification
|
||||
* From within sbt use:
|
||||
* {{{
|
||||
* testOnly gcd.GcdDecoupledTester
|
||||
* }}}
|
||||
* From a terminal shell use:
|
||||
* {{{
|
||||
* sbt 'testOnly gcd.GcdDecoupledTester'
|
||||
* }}}
|
||||
*/
|
||||
class GCDSpec extends AnyFreeSpec with ChiselScalatestTester {
|
||||
|
||||
"Gcd should calculate proper greatest common denominator" in {
|
||||
test(new DecoupledGcd(16)) { dut =>
|
||||
dut.input.initSource()
|
||||
dut.input.setSourceClock(dut.clock)
|
||||
dut.output.initSink()
|
||||
dut.output.setSinkClock(dut.clock)
|
||||
|
||||
val testValues = for { x <- 0 to 10; y <- 0 to 10} yield (x, y)
|
||||
val inputSeq = testValues.map { case (x, y) => (new GcdInputBundle(16)).Lit(_.value1 -> x.U, _.value2 -> y.U) }
|
||||
val resultSeq = testValues.map { case (x, y) =>
|
||||
(new GcdOutputBundle(16)).Lit(_.value1 -> x.U, _.value2 -> y.U, _.gcd -> BigInt(x).gcd(BigInt(y)).U)
|
||||
}
|
||||
|
||||
fork {
|
||||
// push inputs into the calculator, stall for 11 cycles one third of the way
|
||||
val (seq1, seq2) = inputSeq.splitAt(resultSeq.length / 3)
|
||||
dut.input.enqueueSeq(seq1)
|
||||
dut.clock.step(11)
|
||||
dut.input.enqueueSeq(seq2)
|
||||
}.fork {
|
||||
// retrieve computations from the calculator, stall for 10 cycles one half of the way
|
||||
val (seq1, seq2) = resultSeq.splitAt(resultSeq.length / 2)
|
||||
dut.output.expectDequeueSeq(seq1)
|
||||
dut.clock.step(10)
|
||||
dut.output.expectDequeueSeq(seq2)
|
||||
}.join()
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
13
src/test/scala/gcd/test.scala
Normal file
13
src/test/scala/gcd/test.scala
Normal file
@@ -0,0 +1,13 @@
|
||||
package test
|
||||
|
||||
import MAC._
|
||||
import chisel3._
|
||||
import chisel3.stage._
|
||||
|
||||
object testModule extends App {
|
||||
(new chisel3.stage.ChiselStage).execute( Array("--target-dir", "generated/", "-e", "verilog" ) ++ args, Seq(
|
||||
ChiselGeneratorAnnotation(() => {
|
||||
new MIIM()
|
||||
})
|
||||
))
|
||||
}
|
||||
Reference in New Issue
Block a user