define CircuitForRegisterTest[w=16] inputs: ; D[w] = -20 ; clk = 0, clock, inverted ; set = +0, up, inverted ; res = +0, down, inverted outputs: ; Q[w] = -20 ; nQ[w] = +20, inverted symbols: Reg = Register[w] , 0, 0 DataIn = Input[w] , -200, -50, Numeric NotData = Not[w] , -100, -50 AddrIn = Input[w] , -200, +50, Numeric NotAddr = Not[w] , -100, +50 AddrLE = Input , -100, -150, Button, down DataLE = Input , -50, -150, Button, down AddrOE = Input , +100, -150, Switch, down DataOE = Input , +150, -150, Switch, down DataOut = Output[w] , +200, -50, HexDigit, h=20, red AddrOut = Output[w] , +200, +50, HexDigit, h=20, red connections: DataIn -> NotData.A DataIn -> Reg.DataIn NotData -> Reg.nDataIn AddrIn -> NotAddr.A AddrIn -> Reg.AddrIn NotAddr -> Reg.nAddrIn AddrLE -> Reg.AddrLE DataLE -> Reg.DataLE AddrOE -> Reg.AddrOE DataOE -> Reg.DataOE Reg.DataOut -> DataOut Reg.AddrOut -> AddrOut ;placement: ; Reg = 0, 0 ; DataIn = -200, -50, Numeric ; NotData = -100, -50 ; AddrIn = -200, +50, Numeric ; NotAddr = -100, +50 ; AddrLE = -100, -150, Button, down ; DataLE = -50, -150, Button, down ; AddrOE = +100, -150, Switch, down ; DataOE = +150, -150, Switch, down ; DataOut = +200, -50, HexDigit, h=20, red ; AddrOut = +200, +50, HexDigit, h=20, red end