This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`timescale 1ns / 1ps | |
module demux1to4( | |
input Data_i, | |
input[1:0] sel, | |
output reg Data_1_o, | |
output reg Data_2_o, | |
output reg Data_3_o | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`timescale 1ns / 1ps | |
module spi( | |
input clk_i, | |
input rst_i, | |
input miso_i, | |
output mosi_o, | |
output sck_o, | |
input start_i, | |
input [1:0]slave_i, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`timescale 1ns / 1ps | |
module spi_test( | |
); | |
reg clk = 0, rst = 1; | |
reg start = 0; | |
reg[7:0] data_in = 8'b10101101; |