Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: whitequark/glasgow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f07885339842
Choose a base ref
...
head repository: whitequark/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1ac9087ea452
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Dec 9, 2018

  1. Copy the full SHA
    1ac9087 View commit details
Showing with 20 additions and 20 deletions.
  1. +20 −20 software/glasgow/gateware/boneless.py
40 changes: 20 additions & 20 deletions software/glasgow/gateware/boneless.py
Original file line number Diff line number Diff line change
@@ -180,11 +180,11 @@ def decode(v):
)
self.fsm.act("A-READ",
mem_r_a.eq(Cat(i_regY, r_win)),
NextValue(r_opA, mem_r_d),
NextValue(s_opB, mem_r_d),
NextState("A-EXECUTE")
)
self.fsm.act("A-EXECUTE",
s_opB.eq(mem_r_d),
r_opA.eq(mem_r_d),
Case(Cat(i_code1, C(OPCLASS_A, 4)), {
OPCODE_LOGIC: Case(i_type2, {
OPTYPE_AND: s_res.eq(r_opA & s_opB),
@@ -373,15 +373,15 @@ def test_XOR(self, tb):
yield from self.assertMemory(tb, 2, 0x0FF0)

@simulation_test(regs=[0x1234, 0x5678],
code=[ADD (R2, R1, R0)])
code=[ADD (R2, R0, R1)])
def test_ADD(self, tb):
yield from self.run_core(tb)
yield from self.assertMemory(tb, 0, 0x1234)
yield from self.assertMemory(tb, 1, 0x5678)
yield from self.assertMemory(tb, 2, 0x68AC)

@simulation_test(regs=[0x1234, 0x5678],
code=[SUB (R2, R1, R0)])
code=[SUB (R2, R0, R1)])
def test_SUB(self, tb):
yield from self.run_core(tb)
yield from self.assertMemory(tb, 0, 0x1234)
@@ -621,8 +621,8 @@ def test_JNC(self, tb):

@simulation_test(regs=[0x1234, 0x1235],
code=[CMP (R0, R0), JUGE(1), MOVL(R2, 1), MOVL(R3, 1),
CMP (R1, R0), JUGE(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R0, R1), JUGE(1), MOVL(R6, 1), MOVL(R7, 1)])
CMP (R0, R1), JUGE(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R1, R0), JUGE(1), MOVL(R6, 1), MOVL(R7, 1)])
def test_JUGE(self, tb):
yield from self.run_core(tb)
yield from self.assertMemory(tb, 2, 0x0000)
@@ -634,8 +634,8 @@ def test_JUGE(self, tb):

@simulation_test(regs=[0x1234, 0x1235],
code=[CMP (R0, R0), JULT(1), MOVL(R2, 1), MOVL(R3, 1),
CMP (R1, R0), JULT(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R0, R1), JULT(1), MOVL(R6, 1), MOVL(R7, 1)])
CMP (R0, R1), JULT(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R1, R0), JULT(1), MOVL(R6, 1), MOVL(R7, 1)])
def test_JULT(self, tb):
yield from self.run_core(tb)
yield from self.assertMemory(tb, 2, 0x0001)
@@ -647,8 +647,8 @@ def test_JULT(self, tb):

@simulation_test(regs=[0x1234, 0x1235],
code=[CMP (R0, R0), JUGT(1), MOVL(R2, 1), MOVL(R3, 1),
CMP (R1, R0), JUGT(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R0, R1), JUGT(1), MOVL(R6, 1), MOVL(R7, 1)])
CMP (R0, R1), JUGT(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R1, R0), JUGT(1), MOVL(R6, 1), MOVL(R7, 1)])
def test_JUGT(self, tb):
yield from self.run_core(tb)
yield from self.assertMemory(tb, 2, 0x0001)
@@ -660,8 +660,8 @@ def test_JUGT(self, tb):

@simulation_test(regs=[0x1234, 0x1235],
code=[CMP (R0, R0), JULE(1), MOVL(R2, 1), MOVL(R3, 1),
CMP (R1, R0), JULE(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R0, R1), JULE(1), MOVL(R6, 1), MOVL(R7, 1)])
CMP (R0, R1), JULE(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R1, R0), JULE(1), MOVL(R6, 1), MOVL(R7, 1)])
def test_JULE(self, tb):
yield from self.run_core(tb)
yield from self.assertMemory(tb, 2, 0x0000)
@@ -673,8 +673,8 @@ def test_JULE(self, tb):

@simulation_test(regs=[0x0123, 0x8123],
code=[CMP (R0, R0), JSGE(1), MOVL(R2, 1), MOVL(R3, 1),
CMP (R1, R0), JSGE(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R0, R1), JSGE(1), MOVL(R6, 1), MOVL(R7, 1)])
CMP (R0, R1), JSGE(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R1, R0), JSGE(1), MOVL(R6, 1), MOVL(R7, 1)])
def test_JSGE(self, tb):
yield from self.run_core(tb)
yield from self.assertMemory(tb, 2, 0x0000)
@@ -686,8 +686,8 @@ def test_JSGE(self, tb):

@simulation_test(regs=[0x0123, 0x8123],
code=[CMP (R0, R0), JSLT(1), MOVL(R2, 1), MOVL(R3, 1),
CMP (R1, R0), JSLT(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R0, R1), JSLT(1), MOVL(R6, 1), MOVL(R7, 1)])
CMP (R0, R1), JSLT(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R1, R0), JSLT(1), MOVL(R6, 1), MOVL(R7, 1)])
def test_JSLT(self, tb):
yield from self.run_core(tb)
yield from self.assertMemory(tb, 2, 0x0001)
@@ -699,8 +699,8 @@ def test_JSLT(self, tb):

@simulation_test(regs=[0x0123, 0x8123],
code=[CMP (R0, R0), JSGT(1), MOVL(R2, 1), MOVL(R3, 1),
CMP (R1, R0), JSGT(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R0, R1), JSGT(1), MOVL(R6, 1), MOVL(R7, 1)])
CMP (R0, R1), JSGT(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R1, R0), JSGT(1), MOVL(R6, 1), MOVL(R7, 1)])
def test_JSGT(self, tb):
yield from self.run_core(tb)
yield from self.assertMemory(tb, 2, 0x0001)
@@ -712,8 +712,8 @@ def test_JSGT(self, tb):

@simulation_test(regs=[0x0123, 0x8123],
code=[CMP (R0, R0), JSLE(1), MOVL(R2, 1), MOVL(R3, 1),
CMP (R1, R0), JSLE(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R0, R1), JSLE(1), MOVL(R6, 1), MOVL(R7, 1)])
CMP (R0, R1), JSLE(1), MOVL(R4, 1), MOVL(R5, 1),
CMP (R1, R0), JSLE(1), MOVL(R6, 1), MOVL(R7, 1)])
def test_JSLE(self, tb):
yield from self.run_core(tb)
yield from self.assertMemory(tb, 2, 0x0000)