title: Structural Verilog 8-Function ALU
body: <p>I know how to code an ALU using behavioral style, but I'm completely lost as to how to do it using structural design. I need an 8-function bit-slice structural ALU so I can change the word size through a parameter which gets passed and it still works. I found a schematic for a 2-function ALU, but would anyone tell me how I could translate it to 8-function or possibly link me to a Verilog example for it? Here's the 2-function ALU schematic: </p>
  
  <p><a href="https://i.stack.imgur.com/ngyX4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ngyX4.png" alt="enter image description here"></a></p>
  
  <p>I can't remember remotely enough about truth tables, k-maps, etc. to even attempt to figure out the logic for this on my own. Not sure where to even start. Any help is greatly appreciated, thanks!</p>