// The top level module for the Project Checkpoint 1 // // Interface to the board: // // inputs: // clk // reset_raw // enter_raw // dip // // outputs: // ledpanel_raw // left_led_raw // right_led_raw // // Interface to the rest of the world: // // inputs: // uart_in - one bit input for the serial receiver // // outputs: // uart_sample - one bit output that is asserted every time the 'uart_in' is sampled module supertop (clk, reset_raw, enter_raw, dip, ledpanel_raw, left_led_raw, right_led_raw, uart_in, uart_sample) ; input clk ; input reset_raw ; input enter_raw ; input [7:0] dip ; output [7:0] ledpanel_raw ; output [7:0] left_led_raw ; output [7:0] right_led_raw ; input uart_in; output uart_sample; wire reset, enter; reg [7:0] ledpanel; // make sure that all input pins come with positive logic PULLUP u2 (.O(enter_raw)); assign enter = ~enter_raw; assign reset = ~reset_raw; // prepare outputs assign ledpanel_raw = ~ledpanel; // do not light decimal point wire dot; assign dot = 1'b0; // currently output the content of ledpanel[7:0] on the seven segment // number display bin2LED b2l_l (.in(ledpanel[7:4]), .in_dot(dot), .out(left_led_raw)); bin2LED b2l_r (.in(ledpanel[3:0]), .in_dot(dot), .out(right_led_raw)); // Welcome to Checkpoint 1: // This file will, in conjuction with the constraint file project_constraint.exc, // provide you with the interface to the outside world. You can use the following // signals: // (1) clk // (2) reset // (3) enter // (4) dip[7:0] // NOTE: all inputs from buttons have been preprocessed and are POSITIVE logic (e.g. // when you press RESET, the signal 'reset' will be high. However, it is your // responsibility to debounce, edge detect, etc. each required input. // // You can also use ledpanel[7:0] output to display info on the LED bar, or look above for // bin2LED modules that will output whatever you want to the number display (currently it // displays the content of ledpanel[7:0]). // // Q: What should you do for checkpoint 1? // A: Write the UART-type receiver. Its input is signal 'uart_in'. It has two outputs: // (1) output the value received on the number display, // (2) assert signal 'uart_sample' every time your UART receiver samples a value // (this will help you and us to see that your UART is operating correctly) // // your code here...... endmodule