Verification Specification and Simulation Results
6.9 Simulation Results of the CDC Unit’s Integration Test with RISC32
5. The data “HELLO WORLD!” is successfully received by crisc (acts as client) bit by bit and can be found in brx_fifo_data_in of brx of UART_controller of crisc (acts as client).
6. The time taken for the UART to start sending the data is recorded as 2.3x109 ps and it will be used to compare with the time taken after integration of the CDC unit into RISC32.
7. All the results obtained are as expected means that the program has no problem to be run before the integration.
6.9.2 Test Case #2: Sending “HELLO WORLD!” through UART after Integration
Figure 6.9.2-F1: Simulation result for test case #2 using Modelsim
1. The UART_controller in both crisc (under test) and crisc (acts as client) is successfully configured with desired value in which
UARTCR of UART_controller of crisc (under test) = 8’b10100010
UARTCR_UARTEN of UART_controller of crisc (under test) = 1’b1
UARTCR_TXEIE of UART_controller of crisc (under test) = 1’b1
UARTCR_BAUD of UART_controller of crisc (under test) = 3’b010
UARTCR of UART_controller of crisc (acts as client) = 8’b11000010
UARTCR_UARTEN of UART_controller of crisc (acts as client) = 1’b1
UARTCR_RXCIE of UART_controller of crisc (acts as client) = 1’b1
UARTCR_BAUD of UART_controller of crisc (acts as client) = 3’b010
uiua_UARTIE of UART_controller of crisc (acts as client) = 1’b1
2. The SPI_controller in crisc (acts as client) is successfully configured with desired value in which
uispi_SPIE of SPI_controller of crisc (acts as client) = 1’b1
SPICR of SPI_controller of crisc (acts as client) = 8’b10000111 1
2
3 4 5
6
3. The message “HELLO WORLD!” in btx_fifo_data_out of btx of UART_controller of crisc (under test) means that the program is working correctly and ready to send it out bit by bit through uorisc_ua_tx_data.
4. The data “HELLO WORLD!” is successfully sent out through UART (uorisc_ua_tx_data) bit by bit in which the binary value of each character is reversed its arrangement so that the first letter “H” is sent out as “0,0,0,1,0,0,1,0”.
5. The data “HELLO WORLD!” is successfully received by crisc (acts as client) bit by bit and can be found in brx_fifo_data_in of brx of UART_controller of crisc (acts as client).
6. The time taken for the UART to start sending the data is recorded as 10.3x109 ps and it is found to be much longer than the time taken before integration. This is because the time taken is extended due to the slower I/O clock is being connected to the I/O.
8. All the results obtained are as expected means that the design of CDC unit is success since it will not affect the normal operation of RISC32 related with UART even though the I/O system is connected to the slower I/O clock.
6.9.3 Test Case #3: Sending A to Z through SPI before Integration
Figure 6.9.3-F1: Simulation result for test case #3 using Modelsim
1. The UART_controller in both crisc (under test) and crisc (acts as client) is successfully configured with desired value in which
UARTCR of UART_controller of crisc (under test) = 8’b10100010
UARTCR_UARTEN of UART_controller of crisc (under test) = 1’b1
UARTCR_TXEIE of UART_controller of crisc (under test) = 1’b1
UARTCR_BAUD of UART_controller of crisc (under test) = 3’b010
UARTCR of UART_controller of crisc (acts as client) = 8’b11000010
UARTCR_UARTEN of UART_controller of crisc (acts as client) = 1’b1
UARTCR_RXCIE of UART_controller of crisc (acts as client) = 1’b1
UARTCR_BAUD of UART_controller of crisc (acts as client) = 3’b010
uiua_UARTIE of UART_controller of crisc (acts as client) = 1’b1 1
2
3 4
5 6
7
2. The SPI_controller in both crisc (under test) and crisc (acts as client) is successfully configured with desired value in which
SPICR of SPI_controller of crisc (under test) = 8’b11000111
SPE of SPI_controller of crisc (under test) = 1’b1
MSTR of SPI_controller of crisc (under test) = 1’b1
SCR of SPI_controller of crisc (under test) = 3’b111
TXEF of SPI_controller of crisc (under test) = 1’b0
RXBHE of SPI_controller of crisc (under test) = 1’b1
uispi_SPIE of SPI_controller of crisc (acts as client) = 1’b1
SPICR of SPI_controller of crisc (acts as client) = 8’b10000111
3. The letter “A” is successfully sent out through SPI via uorisc_spi_mosi bit by bit in which its binary value is “01000001”.
4. The data “A” followed by “\n” and “\r” in btx_fifo_data_out of btx of UART_controller of crisc (under test) means that the letter “A” is successfully received through SPI
(uorisc_spi_miso) and made to be sent out through UART.
5. The data “A” is successfully sent out through UART (uorisc_ua_tx_data) bit by bit in which its binary value is reversed its arrangement to become “1,0,0,0,0,0,1,0”.
6. The data “A” is successfully received by crisc (acts as client) bit by bit and can be found in brx_fifo_data_in of brx of UART_controller of crisc (acts as client).
7. The time taken for the SPI to start sending the data is recorded as 2.3x109 ps and it will be used to compare with the time taken after integration of the CDC unit into RISC32.
8. All the results obtained are as expected means that the program has no problem to be run before the integration.
6.9.4 Test Case #4: Sending A to Z through SPI after Integration
Figure 6.9.4-F1: Simulation result for test case #4 using Modelsim with (focus on SPI data output)
Figure 6.9.4-F2: Simulation result for test case #4 using Modelsim with (focus on UART data output) 1
2
3
7
4
7
5 6
1. The UART_controller in both crisc (under test) and crisc (acts as client) is successfully configured with desired value in which
UARTCR of UART_controller of crisc (under test) = 8’b10100010
UARTCR_UARTEN of UART_controller of crisc (under test) = 1’b1
UARTCR_TXEIE of UART_controller of crisc (under test) = 1’b1
UARTCR_BAUD of UART_controller of crisc (under test) = 3’b010
UARTCR of UART_controller of crisc (acts as client) = 8’b11000010
UARTCR_UARTEN of UART_controller of crisc (acts as client) = 1’b1
UARTCR_RXCIE of UART_controller of crisc (acts as client) = 1’b1
UARTCR_BAUD of UART_controller of crisc (acts as client) = 3’b010
uiua_UARTIE of UART_controller of crisc (acts as client) = 1’b1
2. The SPI_controller in both crisc (under test) and crisc (acts as client) is successfully configured with desired value in which
SPICR of SPI_controller of crisc (under test) = 8’b11000111
SPE of SPI_controller of crisc (under test) = 1’b1
MSTR of SPI_controller of crisc (under test) = 1’b1
SCR of SPI_controller of crisc (under test) = 3’b111
TXEF of SPI_controller of crisc (under test) = 1’b0
RXBHE of SPI_controller of crisc (under test) = 1’b1
uispi_SPIE of SPI_controller of crisc (acts as client) = 1’b1
SPICR of SPI_controller of crisc (acts as client) = 8’b10000111
3. The letter “A” is successfully sent out through SPI via uorisc_spi_mosi bit by bit in which its binary value is “01000001”.
4. The data “A” followed by “\n” and “\r” in btx_fifo_data_out of btx of UART_controller of crisc (under test) means that the letter “A” is successfully received through SPI
(uorisc_spi_miso) and made to be sent out through UART.
5. The data “A” is successfully sent out through UART (uorisc_ua_tx_data) bit by bit in which its binary value is reversed its arrangement to become “1,0,0,0,0,0,1,0”.
6. The data “A” is successfully received by crisc (acts as client) bit by bit and can be found in brx_fifo_data_in of brx of UART_controller of crisc (acts as client).
7. The time taken for the SPI to start sending the data is recorded as 10.3x109 ps while the time taken for UART to start sending the received SPI data is recorded as 51.1x109 ps and they are found to be much longer than the time taken before integration. This is because the time taken is extended due to the slower I/O clock is being connected to the I/O.
8. All the results obtained are as expected means that the design of CDC unit is success since it will not affect the normal operation of RISC32 related with UART and SPI even though the I/O system is connected to the slower I/O clock.