Forum Discussion
Altera_Forum
Honored Contributor
17 years agoVhdl?
Can anyone help with explaining how the statement below works? I'm confused as to why you AND data_out? Is the statement saying if address = x then read_mux_out <= data_out S...
Altera_Forum
Honored Contributor
17 years agoHi gicolleta,
the statement works right but too complicated to such simplest task :) 1. std_logic_vector'("000000000 000000000000000000000") & (address) - produce 32bit vector from 2-bit address? 2. compare it with 32'h0 and get one-bit result: to_std_logic((((std_logic_vector'("000000000 000000000000000000000") & (address)) = std_logic_vector'("0000000000000000000000000000000 0"))) 3. replicate result upto data_out length vector : REP_A(0/1, 13) 4. Finally just bit-wise AND data_out with '0 or '1 vector - propagate data_out to mux or not. Alternative: read_mux_out <= (others => '0') when address = "00" else data_out;