MCPcopy Create free account
hub / github.com/djhworld/simple-computer / step

Method step

cpu/cpu.go:563–585  ·  view source on GitHub ↗
(clockState bool)

Source from the content-addressed store, hash-verified

561}
562
563func (c *CPU) step(clockState bool) {
564 c.stepper.Update(clockState)
565 c.runStep4Gates()
566 c.runStep5Gates()
567 c.runStep6Gates()
568
569 c.runEnable(clockState)
570 c.updateStates()
571 if clockState {
572 c.runEnable(false)
573 c.updateStates()
574 }
575
576 c.runSet(clockState)
577 c.updateStates()
578 if clockState {
579 c.runSet(false)
580 c.updateStates()
581 }
582
583 // main bus should not have residual data!
584 c.clearMainBus()
585}
586
587func (c *CPU) clearMainBus() {
588 for i := 0; i < arch.BUS_WIDTH; i++ {

Callers 1

StepMethod · 0.95

Calls 8

runStep4GatesMethod · 0.95
runStep5GatesMethod · 0.95
runStep6GatesMethod · 0.95
runEnableMethod · 0.95
updateStatesMethod · 0.95
runSetMethod · 0.95
clearMainBusMethod · 0.95
UpdateMethod · 0.65

Tested by

no test coverage detected