On Tue, 8 Jul 2008, Klaus Rudolph wrote:
Suppose I am simulating two processors with simulavrxx.
I'll want to connect a pin on one processor to a pin on the other.
How do I do that?
I get the impression that I need Net,
but I don't know what to do with it.
Likewise, what do I need to connect
pins to custom simulated hardware?
Please take a look to the example code (anacomp)
Thank you.
I've added comments that might need correcting.
38 #create some external pins
39 ExtAnalogPin pain0 0 $ui "ain0" ".x"
# create an interface to an analog gui pin
# name it pain0
# label it ain0
# ".x"?
40 ExtAnalogPin pain1 0 $ui "ain1" ".x"
41 ExtPin epb $Pin_TRISTATE $ui "->BO" ".x"
# create an interface to a digital gui pin
# epb? $Pin_TRISTATE? ".x"?
42
43
44 #create some nets which connect the pins
45 Net ain0 # start a "wire" named ain0
46 ain0 Add pain0 # add gui pin pain0 to it
47 ain0 Add [AvrDevice_GetPin $dev1 "D6"] # add pin D6 of $dev1 to it
48
Here you see avr pins and also pins from the ui. Connecting multiple cpu
pins is simply done by connecting them with an Add to the net.
One of the custom hardware devices I have in mind
is an LED display multiplexed by cooperating AVRs.
I think that I will have to write that myself,
but I don't know even what to put in a header
file or to what to feed said header file.