Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Do not raise exceptions for now.
  • Loading branch information
zhs04001 committed Nov 2, 2017
1 parent a9f4d5f commit 19295d7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core_sc.py
Expand Up @@ -110,8 +110,8 @@ class Core_SC:
sig.RegWrite = 1
sig.RegDst = 1
sig.ALUOp = 2
else:
raise ValueError("Unknown opcode 0x%02X" % opcode)
#else:
# raise ValueError("Unknown opcode 0x%02X" % opcode)
return

def ALU_control(self, alu_op, funct):
Expand All @@ -121,11 +121,12 @@ class Core_SC:
Output: alu_control_out
"""
alu_control_out = 0
# One example is given, continue to finish other cases.
if alu_op == 0: # 00
alu_control_out = 2 # 0010
else:
raise ValueError("Unknown opcode code 0x%02X" % alu_op)
# else:
# raise ValueError("Unknown opcode code 0x%02X" % alu_op)
return alu_control_out

def sign_extend(self, immd):
Expand Down

0 comments on commit 19295d7

Please sign in to comment.