So over the past few days I've been playing around with visual6502 and perfect6502, building this, which I intend to use to hook up several netlisted things together. I have two questions:
1) This first question involves understanding how visual6502/perfect6502 works. In perfect6502, there are three Boolean properties that a node can have: value (called state in visual6502), pullup, and pulldown. While the value/state holds whether or not the node is actually transmitting a high current, the function to set a node sets the pullup and pulldown properties to the requested state and its inverse, respectively, which are later used to set the value/state for the group of nodes controlled by the node we just set. The segdefs blob used to define nodes specifies the initial pullup property only (that is, pulldown is not set during initialization), and the initial value/state I set to zero. What I didn't understand was what pullup/pulldown represented. According to this, "a '+' [segdefs indicates set pullup on initialization to true] indicates a resistor is connected to the positive supply and will turn on attached gates if not shorted out." So given how setting a node works, should I assume that all node have a pullup resistor that is used to control the value? What about pulldown resistors; would those go on the negative edge? And what is the significance of having both pullup and pulldown set to false on initialization, since setNodes will always ensure pullup == !pulldown?
2) The second question involves what I am doing with visual6502/perfect6502: right now, data accesses are high-level and done whenever the high-level MMU, called monitor (and stored in runtime_init.go; the file should really be renamed monitor.go and the runtime.go to hlekernal.go) asks for a pin value. Of course this is in violation of 6502 timing diagrams. Furthermore, the monitor is using its own clone of the CPU clock, instead of being driven by the 6502's two-phase clock output. What I want to do is have the CPU, MMU, and other stuff run as separate coroutines. In Go, coroutines communicate with channels, which are mechanisms which send at most one value from a sender to a receiver. Channels block: if there is no sender, a receiver waits for one; if there is no receiver, a sender waits for one. I tried several different approaches that directly hook output/bidirectional pins to channels on node set value in an attempt to improve timing accuracy, but this just caused everything to deadlock. I determined there are several spurious reads and writes on pin nodes, so the question here is: is there a reliable way to determine which pin read/write is one that gets read by an external device? Or do I need to manually reconstruct the timing diagrams? Or am I doing it completely wrong and will need to find a different way to represent pins than channels? Or is timing accuracy not even possible on visual6502/perfect6502 because of how it sets groups of nodes/transistors at once?
Please let me know if any of this is unclear and I can try to clear it up. Thanks!
1) This first question involves understanding how visual6502/perfect6502 works. In perfect6502, there are three Boolean properties that a node can have: value (called state in visual6502), pullup, and pulldown. While the value/state holds whether or not the node is actually transmitting a high current, the function to set a node sets the pullup and pulldown properties to the requested state and its inverse, respectively, which are later used to set the value/state for the group of nodes controlled by the node we just set. The segdefs blob used to define nodes specifies the initial pullup property only (that is, pulldown is not set during initialization), and the initial value/state I set to zero. What I didn't understand was what pullup/pulldown represented. According to this, "a '+' [segdefs indicates set pullup on initialization to true] indicates a resistor is connected to the positive supply and will turn on attached gates if not shorted out." So given how setting a node works, should I assume that all node have a pullup resistor that is used to control the value? What about pulldown resistors; would those go on the negative edge? And what is the significance of having both pullup and pulldown set to false on initialization, since setNodes will always ensure pullup == !pulldown?
2) The second question involves what I am doing with visual6502/perfect6502: right now, data accesses are high-level and done whenever the high-level MMU, called monitor (and stored in runtime_init.go; the file should really be renamed monitor.go and the runtime.go to hlekernal.go) asks for a pin value. Of course this is in violation of 6502 timing diagrams. Furthermore, the monitor is using its own clone of the CPU clock, instead of being driven by the 6502's two-phase clock output. What I want to do is have the CPU, MMU, and other stuff run as separate coroutines. In Go, coroutines communicate with channels, which are mechanisms which send at most one value from a sender to a receiver. Channels block: if there is no sender, a receiver waits for one; if there is no receiver, a sender waits for one. I tried several different approaches that directly hook output/bidirectional pins to channels on node set value in an attempt to improve timing accuracy, but this just caused everything to deadlock. I determined there are several spurious reads and writes on pin nodes, so the question here is: is there a reliable way to determine which pin read/write is one that gets read by an external device? Or do I need to manually reconstruct the timing diagrams? Or am I doing it completely wrong and will need to find a different way to represent pins than channels? Or is timing accuracy not even possible on visual6502/perfect6502 because of how it sets groups of nodes/transistors at once?
Please let me know if any of this is unclear and I can try to clear it up. Thanks!
This post has been edited by Andlabs: 17 May 2013 - 08:57 AM


00
