Advertisement
AlexanderAntonov

Untitled

Nov 2nd, 2022
888
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module mux_structural_gate (
  2.     input [1:0] sel_bi
  3.     , input [3:0] data_bi
  4.     , output q_o
  5. );
  6.  
  7. logic [3:0] data_gated;
  8. assign data_gated[0] = data_bi[0] & !sel_bi[0] & !sel_bi[1];
  9. assign data_gated[1] = data_bi[1] &  sel_bi[0] & !sel_bi[1];
  10. assign data_gated[2] = data_bi[2] & !sel_bi[0] &  sel_bi[1];
  11. assign data_gated[3] = data_bi[3] &  sel_bi[0] &  sel_bi[1];
  12.  
  13. assign q_o = |data_gated;
  14.  
  15. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement