Jump to content
  • 0

Basys 3 not mapping corectly


RS1

Question

I have been working on a project with my Basys 3 board and recently ran into an issue where a 16 bit signal I mapped to the LED's was displaying on my seven segment display. The signal was generated by a sudo random number gen thats I created ( the signal changes with the event of the clock). My project also includes a segment decoder which does the appropriate time multiplexing to map a different signal to the segment display. Nowhere in my code can I find the reason for this incorrect mapping, so I wrote a dummy program that did nothing but take the random number and send the signal to the LED's ( I tried indexing the signal (ie. LED(0), LED(1) etc.) as well as creating a different signal for each LED) and still the signal was not showing up on the LED's but rather made the segment display show red faintly. When I send a constant signal to the LED's they light up correctly and the display remains off, why is this? and is there anything I can do to fix this issue and make this work. I need the seven segment display for another part of my project.

RandGen_txt.txt

TOP_txt.txt

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

I'm going to guess that your problem is in the .ucf file you are using.  This is the file that maps logic from within your VHDL (or Verilog) files to external pins on your chip.  Further, I'm going to guess that it is one of two problems: 1) either you haven't included a .ucf file with your project and so Vivado is picking external pins at random for its own purposes, or 2) you have an incorrect .ucf file within your project. 

Are you using the master .xdc file that you can download from the Basys3 reference page?  (https://reference.digilentinc.com/basys3:basys3)

Dan

Link to comment
Share on other sites

I am using the master xdc file for the Basys3. Would the .ucf file cause this error only when the signal is varying because it maps fine when the signal is constant. How do I find this .ucf file, and is there something in particular I need to look for or to change to make it work?

Link to comment
Share on other sites

Sorry ... .ucf files are the files used by ISE, .xdc are the ones used by Vivado.  I tried correcting myself halfway through that response, and apparently didn't get all of the references to .ucf files corrected to the .xdc file.

If you are using the .xdc file for the Basys3, then look through your errors and warnings list for unmapped pins.  My guess is that your led0-led15 pins are not mapping to the led(0) - led(15) pins on the board, that you have the seven segment display commented out, and ... well, let me know.  I'm just guessing, as I don't have your .xdc file, and I don't know that Vivado has acknowledged its existence, or that your led names matched to lines within that file.

Let me know going through the error/warning list helps,

Dan

Link to comment
Share on other sites

No worries. I am pretty sure I set the ports for the led's correctly because when i push a constant value to the LED(15 downto 0) signal I get the appropriate output on the LED's and its only when I push a varying signal from my RandGen do I not receive the signal out on the LED's and otherwise out on the segment display. I attached the .xdc:

Baysis3_Master_BCD.xdc

Link to comment
Share on other sites

Also, in my dummy program the random signal doesn't appear on the display its just each anode is dimly lit. however in my actual program ( I believe because i have the display enabled and have a decoder) this signal is actually decoded and displayed on the board. attached are the files for the full program:

the basis of this program is a matching game.

is_matching.vhd : code that checks if the input on switches is equal to the random signal input.

is_ready.vhd : acts as a clock based off of the count signal (0-15 repeat) from Counter_Top.vhd ( with sub components T_FF.vhd ).

RandGen.vhd : is the sudo random number generator.

clock_div2_2.vhd : slows down the clocking signal.

sseg_dec.vhd : is a BCD to seven segment multiplexer ( module code from a professor ).

 

TOP_MOD.vhd

clock_div2.vhd

Basys3_Master_BCDHEX.xdc

Link to comment
Share on other sites

Your .xdc file looks good.  Looks like my first guess was wrong.

However, let's try this: add logic to your design to drive the seven segment display--drive it to zero (black) if you would like.  This will prevent the tools from being able to use the logic in those output ports as a part of your design.  (Not sure this is what is going on, but it's worth a try.)

Second, you aren't seeing results on your LEDs, right?  So, let me ask, how fast is your design running?  Is it possible the LEDs are changing so ridiculously fast that you can't see the results?

Dan

 

Link to comment
Share on other sites

I used a clock divider and utilized the boards built in clock. However, I did manage to fix this issue. I rewrote a random generator, and it works now. I am unsure what was causing the issue still, however the problem has been resolved. Thank you very much for your help, it is much appreciated.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...