<d1b2>
<Andy> This question might sound dumb, but I just can't find an answer after reading the source code... If I start an applet like the i2c-target, how are the pins assigned when I don't specify any port and pins when starting it? Like this: $ glasgow run i2c-target -V 3.3 -A 0x03 And when I specify them, I can't use pins 0 and 1, because amaranth complains that one of the pins already have been assigned to something, I just don't know what (doesn't
<d1b2>
matter if I try port A or B). When using pins 1 and 2, it at least doesn't complain anymore. $ glasgow run i2c-target --port B -V 3.3 --pin-scl 0 --pin-scl 1 -A 0x03 ... amaranth.build.res.ResourceError: Resource port_b#1 has already been requested Any idea what uses pin 1? I have a rev C1.
<d1b2>
<Andy> It might be very helpful to print the current pin assignment when starting an applet
<mwk>
you specified `--pin-scl` twice and didn't specify `--pin-sda`
Foxyloxy has quit [Read error: Connection reset by peer]
<d1b2>
<Andy> Oh, I feel dumb now... Thank you! Wood, trees, etc.
Foxyloxy has joined #glasgow
<d1b2>
<Andy> Better read the source for 15 minutes before sanity checking the command line!
<mwk>
and as for the other question
<mwk>
`glasgow run i2c-target --help` shows you the default argument values
<mwk>
including pin assignments
<d1b2>
<Andy> oh it uses both A and B at the same time?
<d1b2>
<Andy> ah, lol, the help is generated. That's why I didn't see it in the applet. The thought to run the applet itself with --help never crossed my mind
<mwk>
you mean the AB thing? that's just port allocation, it sets up the applet with access to both A and B ports (and sets up the voltage on them), the actual pins are on port A (in default config at least)
<d1b2>
<Andy> ah, okay. because it says default: AB in the help
<mwk>
basically using `--port AB` means that you have 16 pins available, 0-7 are port A, 8-15 are port B
<mwk>
if you used `--port A` or `--port B`, you'd be restricted to only 0-7 on that single port
<d1b2>
<Andy> oohh, got it
<mwk>
(and the voltage setup would only occur for that one port)
<d1b2>
<Andy> cool, thank you!
redstarcomrade has quit [Quit: Connection closed for inactivity]
<d1b2>
<Andy> Haha, I feel dirty now, but I made it work. I want to receive some ASCII debug output via I2C, because I only have one UART on this AVR that I'm already using for something else. So I came up with this abomination that acts as a glasgow script and replaces the _DummyI2CTargetInterface """ Just print every byte we receive on stdout and flush it on STOP glasgow script glasgow_i2c_terminal.py i2c-target --port B -V 3.3 --pin-scl 0
<d1b2>
_PrintI2CTargetInterface(iface.lower, iface._logger) while True: await iface.read_event()
<whitequark>
I mean this is very much intended usage
<d1b2>
<Andy> yeah, but it wasn't clear to me how I properly replace the dummy target
<d1b2>
<Andy> so I worked my way through what it actually is in the first place with some print(type(iface)) calls and then just stole its lower interface and logger
Foxyloxy has quit [Read error: Connection reset by peer]
jstein has quit [Ping timeout: 272 seconds]
nats` has quit [*.net *.split]
midnight has quit [*.net *.split]
GregNGM has quit [*.net *.split]
merry has quit [*.net *.split]
g5pw has quit [*.net *.split]
Ekho has quit [*.net *.split]
nats` has joined #glasgow
GregNGM has joined #glasgow
midnight has joined #glasgow
g5pw has joined #glasgow
merry has joined #glasgow
Ekho has joined #glasgow
Griwes has quit [Excess Flood]
Griwes has joined #glasgow
alethkit has quit [*.net *.split]
elms has quit [*.net *.split]
marcan has quit [*.net *.split]
kbeckmann has quit [*.net *.split]
davidc__ has quit [*.net *.split]
Luci-ghoule has quit [*.net *.split]
mxshift has quit [*.net *.split]
elms has joined #glasgow
marcan has joined #glasgow
kbeckmann has joined #glasgow
Luci-ghoule has joined #glasgow
Luci-ghoule has quit [Changing host]
Luci-ghoule has joined #glasgow
mxshift has joined #glasgow
alethkit has joined #glasgow
davidc__ has joined #glasgow
ar-jan has joined #glasgow
trh has quit [Quit: weg]
trh has joined #glasgow
joerg has quit [Ping timeout: 250 seconds]
joerg has joined #glasgow
g5pw has quit [Ping timeout: 252 seconds]
merry has quit [Ping timeout: 252 seconds]
g5pw has joined #glasgow
merry has joined #glasgow
GregNGM has quit [Ping timeout: 252 seconds]
GregNGM has joined #glasgow
kbeckmann has quit [Ping timeout: 252 seconds]
kbeckmann has joined #glasgow
davidc__ has quit [Ping timeout: 252 seconds]
davidc__ has joined #glasgow
Luci-ghoule has quit [Quit: Leaving]
FireFly has joined #glasgow
puck has quit [Excess Flood]
puck has joined #glasgow
Foxyloxy has joined #glasgow
Foxyloxy has quit [Read error: Connection reset by peer]
<swiftgeek>
Is there some example of using icestorm with glasgow board?
<whitequark>
not really, the focus is on vertical integration
<swiftgeek>
would be nice if it could easily double as board for learning verilog
<whitequark>
personally I don't consider that a priority
<whitequark>
there are plenty of cheaper boards with more I/O and beginner friendly materials
<whitequark>
also, I rather dislike Verilog
<swiftgeek>
yeah but that means buying two boards instead of one
<whitequark>
yup
potash has quit [Read error: Connection reset by peer]
potash has joined #glasgow
<d1b2>
<Perigoso> Or you setup the toolchain for that yourself, it's open source after all
jstein has quit [Ping timeout: 252 seconds]
jstein has joined #glasgow
bvernoux has joined #glasgow
wifasoi[m] has quit [Quit: You have been kicked for being idle]
redstarcomrade has joined #glasgow
<cyborg_ar>
well at least the non-glasgow board can be bought right now :D. the whole point of the glasgow is the seamless integration, otherwise it is pretty much just another FPGA board
Guest87 has joined #glasgow
Guest87 has quit [Client Quit]
bvernoux has quit [Quit: Leaving]
ar-jan has quit [Ping timeout: 248 seconds]
lxdr has quit [Read error: Connection reset by peer]