Skip to content

Commit 26f00d0

Browse files
authored
Merge pull request #83 from ucb-bar/naming
Set the module name for many parameterized modules with chisel's desiredName
2 parents b3c8a38 + 4225367 commit 26f00d0

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

hardfloat/src/main/scala/DivSqrtRecFN_small.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ class
199199
DivSqrtRawFN_small(expWidth: Int, sigWidth: Int, options: Int)
200200
extends Module
201201
{
202+
override def desiredName = s"DivSqrtRawFN_small_e${expWidth}_s${sigWidth}"
202203
val io = IO(new Bundle {
203204
/*--------------------------------------------------------------------
204205
*--------------------------------------------------------------------*/
@@ -421,6 +422,7 @@ class
421422
DivSqrtRecFNToRaw_small(expWidth: Int, sigWidth: Int, options: Int)
422423
extends Module
423424
{
425+
override def desiredName = s"DivSqrtRecFMToRaw_small_e${expWidth}_s${sigWidth}"
424426
val io = IO(new Bundle {
425427
/*--------------------------------------------------------------------
426428
*--------------------------------------------------------------------*/
@@ -466,6 +468,7 @@ class
466468
DivSqrtRecFN_small(expWidth: Int, sigWidth: Int, options: Int)
467469
extends Module
468470
{
471+
override def desiredName = s"DivSqrtRecFM_small_e${expWidth}_s${sigWidth}"
469472
val io = IO(new Bundle {
470473
/*--------------------------------------------------------------------
471474
*--------------------------------------------------------------------*/

hardfloat/src/main/scala/INToRecFN.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import consts._
4242

4343
class INToRecFN(intWidth: Int, expWidth: Int, sigWidth: Int) extends RawModule
4444
{
45+
override def desiredName = s"INToRecFN_i${intWidth}_e${expWidth}_s${sigWidth}"
4546
val io = IO(new Bundle {
4647
val signedIn = Input(Bool())
4748
val in = Input(Bits(intWidth.W))

hardfloat/src/main/scala/MulAddRecFN.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class MulAddRecFN_interIo(expWidth: Int, sigWidth: Int) extends Bundle
7070
//----------------------------------------------------------------------------
7171
class MulAddRecFNToRaw_preMul(expWidth: Int, sigWidth: Int) extends RawModule
7272
{
73+
override def desiredName = s"MulAddRecFNToRaw_preMul_e${expWidth}_s${sigWidth}"
7374
val io = IO(new Bundle {
7475
val op = Input(Bits(2.W))
7576
val a = Input(Bits((expWidth + sigWidth + 1).W))
@@ -167,6 +168,7 @@ class MulAddRecFNToRaw_preMul(expWidth: Int, sigWidth: Int) extends RawModule
167168
//----------------------------------------------------------------------------
168169
class MulAddRecFNToRaw_postMul(expWidth: Int, sigWidth: Int) extends RawModule
169170
{
171+
override def desiredName = s"MulAddRecFNToRaw_postMul_e${expWidth}_s${sigWidth}"
170172
val io = IO(new Bundle {
171173
val fromPreMul = Input(new MulAddRecFN_interIo(expWidth, sigWidth))
172174
val mulAddResult = Input(UInt((sigWidth * 2 + 1).W))
@@ -297,6 +299,7 @@ class MulAddRecFNToRaw_postMul(expWidth: Int, sigWidth: Int) extends RawModule
297299

298300
class MulAddRecFN(expWidth: Int, sigWidth: Int) extends RawModule
299301
{
302+
override def desiredName = s"MulAddRecFN_e${expWidth}_s${sigWidth}"
300303
val io = IO(new Bundle {
301304
val op = Input(Bits(2.W))
302305
val a = Input(Bits((expWidth + sigWidth + 1).W))

hardfloat/src/main/scala/RecFNToIN.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import consts._
4545

4646
class RecFNToIN(expWidth: Int, sigWidth: Int, intWidth: Int) extends chisel3.Module
4747
{
48+
override def desiredName = s"RecFNToIN_e${expWidth}_s${sigWidth}_i${intWidth}"
4849
val io = IO(new Bundle {
4950
val in = Input(Bits((expWidth + sigWidth + 1).W))
5051
val roundingMode = Input(UInt(3.W))

hardfloat/src/main/scala/RoundAnyRawFNToRecFN.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class
5454
)
5555
extends RawModule
5656
{
57+
override def desiredName = s"RoundAnyRawFNToRecFN_ie${inExpWidth}_is${inSigWidth}_oe${outExpWidth}_os${outSigWidth}"
5758
val io = IO(new Bundle {
5859
val invalidExc = Input(Bool()) // overrides 'infiniteExc' and 'in'
5960
val infiniteExc = Input(Bool()) // overrides 'in' except for 'in.sign'
@@ -294,6 +295,7 @@ class
294295
RoundRawFNToRecFN(expWidth: Int, sigWidth: Int, options: Int)
295296
extends RawModule
296297
{
298+
override def desiredName = s"RoundRawFNToRecFN_e${expWidth}_s${sigWidth}"
297299
val io = IO(new Bundle {
298300
val invalidExc = Input(Bool()) // overrides 'infiniteExc' and 'in'
299301
val infiniteExc = Input(Bool()) // overrides 'in' except for 'in.sign'

0 commit comments

Comments
 (0)