Forum Discussion
Altera_Forum
Honored Contributor
18 years agoaddress decoding in vhdl
hello, I have a soft-core processor and an uart. in order to send the data from output of the processor to the input of uart vhdl module, i'm thinking that i need address decoding to writes the...
Altera_Forum
Honored Contributor
18 years ago --- Quote Start --- hello, but to do the address decoding in vhdl, i dont have any idea how to write it..can someone guide me on how to do this ?? --- Quote End --- It is very simple to write the VHDL code for an address decoder. A general code can be as follows: 2-to-4 address decoder: Using if-else construct ==================== if address = "00" then selection_lines <= "0001"; elsif address = "01" then selection_lines <= "0010"; elsif address = "10" then selection_lines <= "0100"; else address = "11" then selection_lines <= "1000"; end if; =================== You can also use "case-select" and "when-else" constructs to code an address decoder.