Do ROM and/or Lookup Tables introduce an additional delay to the overall circuit?
I want to design a circuit in which a 5-bit input In[4:0] (ranges from 0 to 31) is associated with a corresponding 3-bit output Out[2:0]. I can design this using a 8x3 Encoder in which 5 out of 8 inputs can be connected to In[4:0] to provide the corresponding output, and other inputs (3 out of 8 inputs of encoder) can be set to 0. However, using an encoder will introduce an additional delay.
I can also use a lookup table (LUT) which has 32 locations. The 5-bit input In[4:0] can be used as the address for LUT and the storage size of LUT will be 3 bit to store the output Out[2:0]. The 3-bit output value can be stored in the LUT corresponding to the a given input.
My understanding is:
If we use a lookup table and store the data, the data will be available as soon as we provide the clock signal and it won't require additional delay like encoder.
Please suggest me whether to use an encoder or LUT if the main aim of the design is to reduce the processing time.