Created
July 9, 2020 18:48
-
-
Save rschlaikjer/1c7125fd3dbb4a6bd4e135f93bae24f1 to your computer and use it in GitHub Desktop.
This file contains 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
module pmod_bldc( | |
// PMODSs | |
inout wire [7:0] io_pmod0, | |
inout wire [7:0] io_pmod1, | |
// Motor | |
input wire [2:0] i_motor_h, | |
input wire [2:0] i_motor_l, | |
input wire i_motor_en, | |
input wire i_motor_uev, | |
// Adc | |
input wire i_adc_ncs, | |
input wire i_adc_sck, | |
input wire i_adc_sel, | |
output wire o_adc_miso, | |
input wire i_adc_dc_cal | |
); | |
assign {io_pmod0[3], io_pmod1[0], io_pmod1[1]} = i_motor_h; | |
assign {io_pmod0[7], io_pmod1[4], io_pmod1[5]} = i_motor_l; | |
assign io_pmod0[6] = i_motor_en; | |
assign io_pmod0[0] = i_motor_uev; | |
assign io_pmod1[6] = i_adc_sel; | |
// Uncommenting this line causes the problem | |
// assign o_adc_miso = io_pmod1[3]; | |
assign io_pmod1[7] = i_adc_sck; | |
assign io_pmod1[2] = i_adc_ncs; | |
assign io_pmod0[2] = i_adc_dc_cal; | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment