Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified build.sh
100644 → 100755
Empty file.
8 changes: 6 additions & 2 deletions src/com/modsim/modules/Clock.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,22 @@ public void propagate() {

// Phase 1
BinData p1 = new BinData();
p1.setBit(0, (step == 1) ? 1 : 0);
p1.setBooleanBit(0, step == 1);
phase1.setEnabled(step == 1);

// Phase 2
BinData p2 = new BinData();
p2.setBit(0, (step == 3) ? 1 : 0);
p2.setBooleanBit(0, step == 3);
phase2.setEnabled(step == 3);

// Reset signal
p2.setBooleanBit(1, sendReset);
p1.setBooleanBit(1, sendReset);

// Enable signal
p2.setBooleanBit(2, true);
p1.setBooleanBit(2, true);

// Set the outputs
outputs.get(0).setVal(p1);
outputs.get(1).setVal(p2);
Expand Down
2 changes: 1 addition & 1 deletion src/com/modsim/modules/Register.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class Register extends BaseModule {
h = 50;

dataIn = addInput("Data in", 0, Port.DATA);
controlIn = addInput("Control in", 0, Port.CLOCK, new BinData(0, 1, 0, 0));
controlIn = addInput("Control in", 0, Port.CLOCK, new BinData(0, 1, 0, 1));

dataOut = addOutput("Data out", 0, Port.DATA);
controlOut = addOutput("Control out", 0, Port.CLOCK);
Expand Down