Problem 7-5
Because the signals controlling the datapath operations are asserted under mutually exclusive
conditions (see the ASMD chart), a priority decoder is not needed.
A model using a priority decoder is given below.
module UART_XMTR_Priority_Decoder # (parameter word_size = 8)( // Size of data, e.g., 8 bits
Control_Unit M0 (
Load_XMT_DR, Load_XMT_shftreg, start, shift, clear, Load_XMT_datareg, Byte_ready, T_byte,
BC_lt_BCmax, Clock, rst_b
);
Datapath_Unit_Priority_Decoder M1 (
Serial_out, BC_lt_BCmax, Data_Bus, Load_XMT_DR, Load_XMT_shftreg, start, shift,
clear, Clock, rst_b
);
)(
output reg Load_XMT_DR, // Loads Data_Bus into XMT_datareg
output reg Load_XMT_shftreg, // Loads XMT_datareg into XMT_shftreg
output reg start, // Launches shifting of bits in XMT_shftreg
output reg shift, // Shifts bits in XMT_shftreg
output reg clear, // Clears bit_count after last bit is sent
input Load_XMT_datareg, // Asserts Load_XMT_DR in state idle