Administrator approval is now required for registering new accounts. If you are registering a new account, and are external to the University, please ask the repository owner to contact ServiceLine to request your account be approved. Repository owners must include the newly registered email address, and specific repository in the request for approval.

The University Git service will be offline on Wednesday December 1st 2021, between 08:00am - 09:00am to complete a required scheduled change. Please ensure that you do not make any changes or commits to your projects/repositories during this time as these changes may be lost.

Verified Commit 2b87115f authored by Minyong Li's avatar Minyong Li 💬
Browse files

core: remove branching support

There is now only a 'halt' signal that stops the processor.
parent 0e8288d6
......@@ -46,10 +46,7 @@ class CanCore(implicit cfg: CanCoreConfiguration) extends MultiIOModule {
private val ctrl = CanCoreControlWord) := ctrl.absoluteBranch := ctrl.relativeBranch := ctrl.immediate
programMemory.take := io.take
programMemory.halt := Mux(io.take, io.take, ctrl.halt) := Mux(
......@@ -12,12 +12,7 @@ class ProgramMemory(implicit cfg: CanCoreConfiguration) extends MultiIOModule {
private val addrWidth = log2Ceil(cfg.programMemoryWords)
private val cwWidth = (new CanCoreControlWord).getWidth
val br = IO(new Bundle {
val abs = Input(Bool())
val rel = Input(Bool())
val addr = Input(UInt(addrWidth.W))
val take = IO(Input(Bool()))
val halt = IO(Input(Bool()))
val read = IO(new MemoryReadIO(addrWidth, cwWidth))
val write = IO(new MemoryWriteIO(addrWidth, cwWidth))
......@@ -34,21 +29,9 @@ class ProgramMemory(implicit cfg: CanCoreConfiguration) extends MultiIOModule {
private val pc = RegInit(0.U(addrWidth.W))
pc := Mux(
(pc.asSInt() + br.addr.asSInt()).asUInt(),
pc + 1.U
pc := Mux(halt, pc, pc + 1.U) := mem(Mux(take, read.addr, pc)) := mem(Mux(halt, read.addr, pc))
when(write.en) {
mem(write.addr) :=
......@@ -12,9 +12,7 @@ class CanCoreControlWord(implicit val cfg: CanCoreConfiguration)
private val dataMemoryAddressWidth = log2Ceil(cfg.dataMemoryWords)
private val registerFileAddressWidth = log2Ceil(cfg.registerFileWords)
val immediate = UInt(cfg.immediateWidth.W)
val absoluteBranch = Bool()
val relativeBranch = Bool()
val halt = Bool()
val dataMemoryReadAddress = UInt(dataMemoryAddressWidth.W)
val dataMemoryWriteEnable = Bool()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment