-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There is a naming conflict of the ALU module which prevents a successful synthesis with Yosys. This patch fixes this conflict. In addition, this patch introduces the configurations expected by Litex when generating an SoC
- Loading branch information
1 parent
dbcb06a
commit c8d8e0c
Showing
6 changed files
with
286 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// See LICENSE.SiFive for license details. | ||
// See LICENSE.Berkeley for license details. | ||
|
||
package freechips.rocketchip.subsystem | ||
|
||
import chisel3.util._ | ||
import org.chipsalliance.cde.config._ | ||
import freechips.rocketchip.devices.debug._ | ||
import freechips.rocketchip.devices.tilelink._ | ||
import freechips.rocketchip.diplomacy._ | ||
import freechips.rocketchip.rocket._ | ||
import freechips.rocketchip.tile._ | ||
import freechips.rocketchip.util._ | ||
|
||
class WithLitexMemPort extends Config((site, here, up) => { | ||
case ExtMem => Some(MemoryPortParams(MasterPortParams( | ||
base = x"8000_0000", | ||
size = x"8000_0000", | ||
beatBytes = site(MemoryBusKey).beatBytes, | ||
idBits = 4), 1)) | ||
}) | ||
|
||
class WithLitexMMIOPort extends Config((site, here, up) => { | ||
case ExtBus => Some(MasterPortParams( | ||
base = x"1000_0000", | ||
size = x"7000_0000", | ||
beatBytes = site(SystemBusKey).beatBytes, | ||
idBits = 4)) | ||
}) | ||
|
||
class WithLitexSlavePort extends Config((site, here, up) => { | ||
case ExtIn => Some(SlavePortParams( | ||
beatBytes = site(SystemBusKey).beatBytes, | ||
idBits = 8, | ||
sourceBits = 4)) | ||
}) | ||
|
||
class WithNBitMemoryBus(dataBits: Int) extends Config((site, here, up) => { | ||
case MemoryBusKey => up(MemoryBusKey, site).copy(beatBytes = dataBits/8) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,208 @@ | ||
// See LICENSE.SiFive for license details. | ||
// See LICENSE.Berkeley for license details. | ||
|
||
package freechips.rocketchip.system | ||
|
||
import org.chipsalliance.cde.config.Config | ||
import freechips.rocketchip.subsystem._ | ||
|
||
class BaseLitexConfig extends Config( | ||
new WithLitexMemPort() ++ | ||
new WithLitexMMIOPort() ++ | ||
new WithLitexSlavePort ++ | ||
new WithNExtTopInterrupts(8) ++ | ||
new WithCoherentBusTopology ++ | ||
new BaseConfig | ||
) | ||
|
||
class LitexConfigSmall1x1 extends Config( | ||
new WithNSmallCores(1) ++ | ||
new WithNBitMemoryBus(64) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigSmall1x2 extends Config( | ||
new WithNSmallCores(1) ++ | ||
new WithNBitMemoryBus(128) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigSmall1x4 extends Config( | ||
new WithNSmallCores(1) ++ | ||
new WithNBitMemoryBus(256) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigSmall1x8 extends Config( | ||
new WithNSmallCores(1) ++ | ||
new WithNBitMemoryBus(512) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigSmall2x1 extends Config( | ||
new WithNSmallCores(2) ++ | ||
new WithNBitMemoryBus(64) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigSmall2x2 extends Config( | ||
new WithNSmallCores(2) ++ | ||
new WithNBitMemoryBus(128) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigSmall2x4 extends Config( | ||
new WithNSmallCores(2) ++ | ||
new WithNBitMemoryBus(256) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigSmall2x8 extends Config( | ||
new WithNSmallCores(2) ++ | ||
new WithNBitMemoryBus(512) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigSmall4x1 extends Config( | ||
new WithNSmallCores(4) ++ | ||
new WithNBitMemoryBus(64) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigSmall4x2 extends Config( | ||
new WithNSmallCores(4) ++ | ||
new WithNBitMemoryBus(128) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigSmall4x4 extends Config( | ||
new WithNSmallCores(4) ++ | ||
new WithNBitMemoryBus(256) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigSmall4x8 extends Config( | ||
new WithNSmallCores(4) ++ | ||
new WithNBitMemoryBus(512) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigSmall8x1 extends Config( | ||
new WithNSmallCores(8) ++ | ||
new WithNBitMemoryBus(64) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigSmall8x2 extends Config( | ||
new WithNSmallCores(8) ++ | ||
new WithNBitMemoryBus(128) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigSmall8x4 extends Config( | ||
new WithNSmallCores(8) ++ | ||
new WithNBitMemoryBus(256) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigSmall8x8 extends Config( | ||
new WithNSmallCores(8) ++ | ||
new WithNBitMemoryBus(512) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig1x1 extends Config( | ||
new WithNBigCores(1) ++ | ||
new WithNBitMemoryBus(64) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig1x2 extends Config( | ||
new WithNBigCores(1) ++ | ||
new WithNBitMemoryBus(128) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig1x4 extends Config( | ||
new WithNBigCores(1) ++ | ||
new WithNBitMemoryBus(256) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig1x8 extends Config( | ||
new WithNBigCores(1) ++ | ||
new WithNBitMemoryBus(512) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig2x1 extends Config( | ||
new WithNBigCores(2) ++ | ||
new WithNBitMemoryBus(64) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig2x2 extends Config( | ||
new WithNBigCores(2) ++ | ||
new WithNBitMemoryBus(128) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig2x4 extends Config( | ||
new WithNBigCores(2) ++ | ||
new WithNBitMemoryBus(256) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig2x8 extends Config( | ||
new WithNBigCores(2) ++ | ||
new WithNBitMemoryBus(512) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig4x1 extends Config( | ||
new WithNBigCores(4) ++ | ||
new WithNBitMemoryBus(64) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig4x2 extends Config( | ||
new WithNBigCores(4) ++ | ||
new WithNBitMemoryBus(128) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig4x4 extends Config( | ||
new WithNBigCores(4) ++ | ||
new WithNBitMemoryBus(256) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig4x8 extends Config( | ||
new WithNBigCores(4) ++ | ||
new WithNBitMemoryBus(512) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig8x1 extends Config( | ||
new WithNBigCores(8) ++ | ||
new WithNBitMemoryBus(64) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig8x2 extends Config( | ||
new WithNBigCores(8) ++ | ||
new WithNBitMemoryBus(128) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig8x4 extends Config( | ||
new WithNBigCores(8) ++ | ||
new WithNBitMemoryBus(256) ++ | ||
new BaseLitexConfig | ||
) | ||
|
||
class LitexConfigBig8x8 extends Config( | ||
new WithNBigCores(8) ++ | ||
new WithNBitMemoryBus(512) ++ | ||
new BaseLitexConfig | ||
) |