Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

VHDL code help!

Altera_Forum
Honored Contributor II
2,459 Views

Hi guys, 

 

I have written out this code, but it gave me error that type R1-R5 is incompatible with A-E. Please help !!!
0 Kudos
10 Replies
Altera_Forum
Honored Contributor II
1,538 Views

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?
0 Kudos
Altera_Forum
Honored Contributor II
1,538 Views

 

--- 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?
0 Kudos
Altera_Forum
Honored Contributor II
1,538 Views

Yes 

 

A : In integer;
0 Kudos
Altera_Forum
Honored Contributor II
1,538 Views

 

--- 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?
0 Kudos
Altera_Forum
Honored Contributor II
1,538 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
1,538 Views

 

--- 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?
0 Kudos
Altera_Forum
Honored Contributor II
1,538 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
1,538 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
1,538 Views

 

--- 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....
0 Kudos
Altera_Forum
Honored Contributor II
1,538 Views

 

--- 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/)
0 Kudos
Reply