Questions about buffers

Applications, development tools, FPGA, C, WEB
Post Reply
jialunluo
Posts: 20
Joined: Fri Sep 09, 2016 3:34 pm

Questions about buffers

Post by jialunluo » Tue Jan 03, 2017 10:54 pm

I am playing around with Verilog more and I am trying to use as little existing RP infrastructure as possible to build things from the ground up. I encountered a warning about IO port buffering when I try to use the LEDs.

The code is pretty simple:

Code: Select all

reg [31 : 0] blinkCounter = 0;
reg led_blink = 0;
reg [6:0] counter7 = 0;

assign led_o[0] = exp_p_io[6] ? 1'b1 : 1'b0;
assign led_o[7:1] = exp_n_io[6] ? counter7 : {7{led_blink}};
When I compiled it, the synthesizer warns me the following, albeit the LEDs blink as expected. The warning messages are

Code: Select all

WARNING: [DRC 23-20] Rule violation (RPBF-3) IO port buffering is incomplete - Device port exp_p_io[6] expects both input and output buffering but the buffers are incomplete.
WARNING: [DRC 23-20] Rule violation (RPBF-3) IO port buffering is incomplete - Device port led_o[0] expects both input and output buffering but the buffers are incomplete.
WARNING: [DRC 23-20] Rule violation (RPBF-3) IO port buffering is incomplete - Device port led_o[1] expects both input and output buffering but the buffers are incomplete.
WARNING: [DRC 23-20] Rule violation (RPBF-3) IO port buffering is incomplete - Device port led_o[2] expects both input and output buffering but the buffers are incomplete.
WARNING: [DRC 23-20] Rule violation (RPBF-3) IO port buffering is incomplete - Device port led_o[3] expects both input and output buffering but the buffers are incomplete.
WARNING: [DRC 23-20] Rule violation (RPBF-3) IO port buffering is incomplete - Device port led_o[4] expects both input and output buffering but the buffers are incomplete.
WARNING: [DRC 23-20] Rule violation (RPBF-3) IO port buffering is incomplete - Device port led_o[5] expects both input and output buffering but the buffers are incomplete.
WARNING: [DRC 23-20] Rule violation (RPBF-3) IO port buffering is incomplete - Device port led_o[6] expects both input and output buffering but the buffers are incomplete.
WARNING: [DRC 23-20] Rule violation (RPBF-3) IO port buffering is incomplete - Device port led_o[7] expects both input and output buffering but the buffers are incomplete.
And so I have two questions: what's the principle of buffering in using the IO ports? I found in red_pitaya_top.sv that I probably should do the following:

Code: Select all

IOBUF iobuf_led   [8-1:0] (.O(gpio_i[7:0]), .IO(led_o),    .I(gpio_o[7:0]), .T(gpio_t[7:0]) );
But I am confused why the LEDs also serve as input ports?

Thanks in advance!

jeanminet
Posts: 33
Joined: Tue Aug 25, 2015 12:17 pm
Contact:

Re: Questions about buffers

Post by jeanminet » Wed Jan 04, 2017 8:01 pm

It is strange indeed.
My guess is that the guys from RP considered the LEDs as 8 additional GPIOs in order to control the 16 GPIOs and the 8 LEDs using a single 24-bits GPIO interface
https://github.com/RedPitaya/RedPitaya/ ... gpio_if.sv

jialunluo
Posts: 20
Joined: Fri Sep 09, 2016 3:34 pm

Re: Questions about buffers

Post by jialunluo » Thu Jan 05, 2017 8:54 pm

I think you are right, by making LEDs IO ports one can either write to them or read them? (As in rp.h) However, wouldn't you be able to do so without using IOBUF as well? For example, I can make a register and connect the leds. I can still read and write to the registers to change/read the led status.

Code: Select all

reg [7:0] led_reg;
assign led_o= led_reg;

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 92 guests