Skip to content

Commit

Permalink
merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Urbanczyk committed Mar 31, 2024
1 parent cde59f7 commit 83aeeae
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
6 changes: 1 addition & 5 deletions coreblocks/frontend/fetch/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def __init__(self, gen_params: GenParams, icache: CacheInterface, cont: Method)
self.stall_exception.add_conflict(self.resume, Priority.LEFT)

# histogram for stalls length
# self.perf_stall_exception = LatencyMeasurer("frontend.fetch.exception_stall_duration", "The histogram of durations of stalls of the fetch unit caused by exceptions", slots_number=10, max_latency=1000)
self.perf_fetch_utilization = TaggedCounter(
"frontend.fetch.fetch_block_util",
"Number of valid instructions in fetch blocks",
Expand Down Expand Up @@ -340,14 +339,11 @@ def flush():
log.info(
m,
True,
"[STAGE 2] Valid mask: {:08b} redirection mask: {:08b} prefix: {:08b} jump_offset: {}, rou: {}, rou_idx: {}",
"[STAGE 2] Valid mask: {:08b} redirection mask: {:08b} prefix: {:08b} jump_offset: {}",
instr_valid,
Cat(instr_redirects),
valid_instr_prefix,
predecoders[0].jump_offset,
redirect_or_unsafe,
redirect_or_unsafe_idx,
Cat(instr_unsafe),
)

# The ultimate mask that tells which instructions should be sent to the backend.
Expand Down
3 changes: 1 addition & 2 deletions coreblocks/params/instr.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def __set__(self, obj, value) -> None:

obj.__dict__[self._name] = field_val


def get_parts(self, value: Value) -> list[Value]:
base = self.bases()
size = self.sizes()
Expand All @@ -114,7 +113,7 @@ def get_parts(self, value: Value) -> list[Value]:
for i in range(len(base)):
ret.append(value[offset : offset + size[i]])
offset += size[i]

return ret


Expand Down
4 changes: 0 additions & 4 deletions test/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,7 @@ def push_instr(self, opcode):
def push_register_load_imm(self, reg_id, val):
addi_imm = signed_to_int(val & 0xFFF, 12)

<<<<<<< HEAD
yield from self.push_instr(UTypeInstr(opcode=Opcode.LUI, rd=reg_id, imm=val).encode())
=======
yield from self.push_instr(UTypeInstr(opcode=Opcode.LUI, rd=reg_id, imm=lui_imm << 12).encode())
>>>>>>> instr_def_refactor
yield from self.push_instr(
ITypeInstr(opcode=Opcode.OP_IMM, rd=reg_id, funct3=Funct3.ADD, rs1=reg_id, imm=addi_imm).encode()
)
Expand Down

0 comments on commit 83aeeae

Please sign in to comment.