Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

Detecting a Counter

Altera_Forum
Honored Contributor II
1,632 Views

I need to design a combinational circuit that will detect the value 0x41000 when my Input[27..0] equals that value. I am having troubles getting started on this circuit, and would greatly appreciate any help. Thank you!

0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
860 Views

VHDL: 

 

match <= '1' when (input = X"0041000") else '0'; 

 

Verilog: (or something close to this) 

 

assign match = (input == 28'h41000);
0 Kudos
Altera_Forum
Honored Contributor II
860 Views

I've never used Verilog or VHDL. Is there a tutorial or a pdf I can read up on how to use these? Thank you for your quick reply!

0 Kudos
Altera_Forum
Honored Contributor II
860 Views

 

--- Quote Start ---  

I've never used Verilog or VHDL. Is there a tutorial or a pdf I can read up on how to use these? Thank you for your quick reply! 

--- Quote End ---  

 

 

How are you creating your FPGA designs then? Schematic capture? 

 

There's probably a comparator component you can use. 

 

As for HDL tutorials, you're better off getting a good book. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
860 Views

Yes, purley schematics. I just started using Quartus/Altera. I've never heard of Verilog or HDL until now, and I read up on both a little bit and am not sure if I am supposed to use them or not.

0 Kudos
Altera_Forum
Honored Contributor II
860 Views

Definitely Learn one or the other: 

 

Verilog is very easy to learn if you have any basic programming experience. But like C, you can shoot yourself in the foot with it. (IE, it's easier to read, but will allow you to do things that will not always work). 

 

VHDL is more structured, so it's a bit harder to read at first, and has more typing to get something done. 

 

Verilog is mainly using in the commercial industry in the US. 

VHDL tends to be mainly used in military industry or Europe. 

 

Both are valid and good hardware description languages, that are well worth the time to learn. You will see both in time. 

 

The advantage these have over schematic is many, but mainly the complexity of the designs you can easily accomplish. 

 

Pete
0 Kudos
Altera_Forum
Honored Contributor II
860 Views

There are a couple of free ebooks on Verilog at: 

 

http://edudirectory.50webs.com/tutorbooks.htm 

 

So that should get you started.
0 Kudos
Altera_Forum
Honored Contributor II
860 Views

One thing to note about Verilog - it has been superseded by SystemVerilog. 

 

If you are going to learn a new language, learn SystemVerilog. 

 

SystemVerilog supports many of the constructs that VHDL supports, and adds a lot more verification features. Altera's most recent IP is being delivered in SystemVerilog format ... so go with the flow and learn SystemVerilog. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
860 Views

 

--- Quote Start ---  

Yes, purley schematics. I just started using Quartus/Altera. I've never heard of Verilog or HDL until now, and I read up on both a little bit and am not sure if I am supposed to use them or not. 

--- Quote End ---  

 

 

What do you mean "supposed to use them"? 

 

If you want to learn to use them, go ahead and do it. 

 

Cheers, 

Dave
0 Kudos
Reply