Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20642 Discussions

how to describe same block in Demux in VHDL

Altera_Forum
Honored Contributor II
1,414 Views

I am having problem in describing a 1 to 2**n Demux. I wrote code first for 1 to 2 demux,and use it to buid 1 to 4 demux and then 1 to 8. At the end I want to get a 1 to 2**n demux. they are shows on the images. I would rather appreciate if anyone give me some advice to use generate or others to describe it.

0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
323 Views

 

--- Quote Start ---  

 

I would rather appreciate if anyone give me some advice to use generate or others to describe it. 

--- Quote End ---  

 

 

Here's a mux. Wrap your head around the logic, and you can figure out how to describe a demux :) 

 

The comments in the code described it fairly well. The PDF is a figure to help describe the indexing. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
323 Views

that's a nice little reference PDF

0 Kudos
Altera_Forum
Honored Contributor II
323 Views

 

--- Quote Start ---  

that's a nice little reference PDF 

--- Quote End ---  

 

 

I was getting confused with the indexing, so needed to draw a couple of examples to see what the patterns were. 

 

The geometric and algebraic series indexing shows up in adder trees and count-ones (bit-error-rate counters) too.  

 

The indexing is much more obvious if you count from the output back to the input. 

 

For the original poster's demux application, the indexing order would probably be reversed, to reuse the same scheme. 

 

Cheers, 

Dave
0 Kudos
Reply