- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
I have written out this code, but it gave me error that type R1-R5 is incompatible with A-E. Please help !!!Link Copied
10 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All of the A-E inputs are a single std_logic.
R1-R8 are declared as integers. I dont really know what you're trying to do? why not just input a load of integers?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- All of the A-E inputs are a single std_logic. R1-R8 are declared as integers. I dont really know what you're trying to do? why not just input a load of integers? --- Quote End --- Is there anyway to declare A-E as integer, or vice versa?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes
A : In integer;- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Yes A : In integer; --- Quote End --- Then for the test bench code, the auto generated code still has this signal A : std_logic := '0'; signal B : std_logic := '0'; signal C : std_logic := '0'; signal D : std_logic := '0'; signal E : std_logic := '0'; How do i change them?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please post your modifed code.
The fact the auto-generated testbench still uses std logic makes me beleive you modified nothing. And you shouldnt need to use the auto-generation - you can write it yourself.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Please post your modifed code. The fact the auto-generated testbench still uses std logic makes me beleive you modified nothing. And you shouldnt need to use the auto-generation - you can write it yourself. --- Quote End --- I modified them manually, and it does not give me errors after i synthesized, so i believe its working? Can teach me how to write test bench manually without auto generated code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
and i gave me this warnings too
Xst:647 - Input <A<31:7>> is never used. This port will be preserved and left unconnected if it belongs to a top-level block or it belongs to a sub-block and the hierarchy of this sub-block is preserved. WARNING:Xst:647 - Input <B<31:7>> is never used. This port will be preserved and left unconnected if it belongs to a top-level block or it belongs to a sub-block and the hierarchy of this sub-block is preserved. WARNING:Xst:647 - Input <C<31:7>> is never used. This port will be preserved and left unconnected if it belongs to a top-level block or it belongs to a sub-block and the hierarchy of this sub-block is preserved. WARNING:Xst:647 - Input <D<31:7>> is never used. This port will be preserved and left unconnected if it belongs to a top-level block or it belongs to a sub-block and the hierarchy of this sub-block is preserved. WARNING:Xst:647 - Input <E<31:7>> is never used. This port will be preserved and left unconnected if it belongs to a top-level block or it belongs to a sub-block and the hierarchy of this sub-block is preserved.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is because you declared the ports as integer without a range definition. integers will synthesise to 32 bit busses, and as the MSBs are never used, they are removed.
You should not use integers at the top level to connect to pins on the device. There are plenty of tutorials on the internet on how to write a testbench. A testbench is just another peice of code (maybe VHDL) that provides stimulus for your design under test. Because it is not synthesised, you can write things you cannot write in VHDL code for FPGAs, eg:
signal clk : std_logic := '0';
....
clk <= not clk after 5 ns; --100 MHz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi guys, I have written out this code, but it gave me error that type R1-R5 is incompatible with A-E. Please help !!! --- Quote End --- Hi, I need a code for Trellis code modulation in xilinx - VHDL Code ........ Please send to my mail ID....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi, I need a code for Trellis code modulation in xilinx - VHDL Code ........ Please send to my mail ID.... --- Quote End --- You'll find everything you need here (http://mattgemmell.com/what-have-you-tried/)

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page