Bidirection pin / data bus

19 views
Skip to first unread message

KT Chiam

unread,
Jul 2, 2024, 10:34:33 AM (24 hours ago) Jul 2
to FPGAwars: explorando el lado libre
Hi,

Is there example of how to use bidirectional pin such as data bus to access parallel flash memory? There is only input port and output port in Ice Studio.

Thank you,

Best Regards,
KT

charli va

unread,
Jul 2, 2024, 11:15:05 AM (23 hours ago) Jul 2
to fpga-wars-explora...@googlegroups.com
Hi KT!

you need to activate it in "Advanced features -> Allow tri-state connections":

Captura de pantalla 2024-07-02 a las 17.11.14.png

Once you do it, for example in code block appears two new input types:

Captura de pantalla 2024-07-02 a las 17.12.02.png

These are the same (inout/tristate port), the only difference is in wich side of the visual block do you prefer to show (at the left side or at the right).

Cheers!


--
Has recibido este mensaje porque estás suscrito al grupo "FPGAwars: explorando el lado libre" de Grupos de Google.
Para cancelar la suscripción a este grupo y dejar de recibir sus mensajes, envía un correo electrónico a fpga-wars-explorando-el...@googlegroups.com.
Para ver esta conversación en el sitio web, visita https://groups.google.com/d/msgid/fpga-wars-explorando-el-lado-libre/8af449c7-7db3-44aa-97a8-5142bd0120f7n%40googlegroups.com.

KT Chiam

unread,
Jul 2, 2024, 11:38:34 AM (23 hours ago) Jul 2
to FPGAwars: explorando el lado libre
Hi Charli,

Thank you for your quick response! After enabling the 'Allow Tri-state connections', I can see additional option, although it is not same as your screen.
How can I set it as input at some time and output at other time? The pin wiring will cause invalid connection if I wire constant bit to an tristate output.

tristate.png

Invalid conn.png

Thank you

Best Regards,
KT

charli va

unread,
Jul 2, 2024, 11:48:14 AM (23 hours ago) Jul 2
to fpga-wars-explora...@googlegroups.com
Hi KT! yes, my screenshot is from "code block config" in ports like in your snapshot you need to activate  "inout" pin.

Yo need to select the port in the bluebox (now is in null and icestudio not know what port are you binding) .

KT Chiam

unread,
Jul 2, 2024, 11:57:22 AM (22 hours ago) Jul 2
to FPGAwars: explorando el lado libre
Hi Chatty,

I try to enable "inout pin", but there is still 1 port on the block, depending on I select Input or Output port initially. I saw an example by Obijuan. Is this the way to do it?

inout-right.png

Thank you.

charli va

unread,
Jul 2, 2024, 12:32:28 PM (22 hours ago) Jul 2
to fpga-wars-explora...@googlegroups.com
Hi KT i don't understand you well, but i'll try to explain me.

The "inout" pin only need "one pin" to do the "in" or "out" function.

In your verilog code block you could use the pin that you define as inout as tristate pin. At that moment, if you write values in this pin, the pin acts as "out" but, if you want to read from it "in" you needs to put this pin in Z state.


The other snapshot , the green block,  is other way to do an inout pin based in fpga primitives. Obijuan has an awesome documentation about it using this kind of blocks , https://github.com/Obijuan/Cuadernos-tecnicos-FPGAs-libres/wiki/CT.3:-Pines-de-Entrada-Salida, is in Spanish but i think you could translate with some automatic tool.

i hope this help you.



Reply all
Reply to author
Forward
0 new messages