USER_IO zero and high-Z

Discussion of developmental aspects of the MiSTer Project.
S0urceror
Posts: 23
Joined: Sat Nov 21, 2020 4:11 pm
Has thanked: 1 time
Been thanked: 8 times

USER_IO zero and high-Z

Unread post by S0urceror »

When you drive 1's and 0's to the USER_IO port the signals are respectively high-Z and GND.

This means that you need to use a pull-up resistor to pull high-Z to 3.3V. And because of parasitic capacitance on the IO board this means the serial bandwidth is limited to 150kHz.

Why not drive real 1's instead? Is is okay to replace the following in sys_top.v?

Code: Select all

assign USER_IO[0] = !user_out[0]  ? 1'b0 : 1'b1;
// assign USER_IO[0] = !user_out[0]  ? 1'b0 : 1'bZ;
 
dshadoff
Core Developer
Posts: 534
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 19 times
Been thanked: 141 times

Re: USER_IO zero and high-Z

Unread post by dshadoff »

What is your goal ?
The serial bandwidth can be higher than that with a slightly more aggressive pull-up resistor - 4K should not be a problem, which has a rise time of something like 2 microseconds (can't remember - this was some time ago).

They are configured for open-drain so that communication can take place bi-directionally, and because SNAC wiring is different for each core, implying that each data line is sometimes input and sometimes output.

If you drive a voltage out one of the pins which is then shorted to ground on the device attached, that's not going to be a good long-term strategy.

So while you can drive '1's, you should give thought as to what the consequences would be, and whether it is safe for the DE10-Nano and the device connected to it.
S0urceror
Posts: 23
Joined: Sat Nov 21, 2020 4:11 pm
Has thanked: 1 time
Been thanked: 8 times

Re: USER_IO zero and high-Z

Unread post by S0urceror »

I went ahead and did a test.

In the normal setup I can drive an SPI with approx 150kHz which is roughly 15KB/second including some overhead to a SPI USB interface.

After changing sys_top into outputting real 1’s and 0’s I do 2Mhz or around 200KB/sec.

So changing this creates at least 12 times the bandwidth.

I guess driving Z’s in stead of 1’s was chosen to be able to do bidirectional communication and indeed to protect the nano. But if you know what your doing and create your own extensions you can go much faster.
Post Reply