Input clk, // high speed clock from PLL, 50 MHz input count_en, // allow/inhibit counting input switches, // 4 slide switches to set display value increment rate output digit5, // active low bits for 7 segments of digit 5 (left-most digit) output digit4, // active low bits for 7 segments of digit 4 output digit3, // active low bits for 7 segments of digit 3 output digit2, // active low bits for 7 segments of digit 2 output digit1, // active low bits for 7 segments of digit 1 output digit0 // active low bits for 7 segments of digit 0 (right-most digit) -> guarantees that typo'd net names get trapped module test_seven_segments // `default_nettype none // Require all nets to be declared before used. // This could have been done as a testbench and run in simulation, but it was // easier to verify the shapes of all the letters/numbers on the actual // hardware displays. This allows for a quick test over the full range of values, testing all 6 // digits quickly, and it was amusing, so why not. The 16 possible speeds can be set from 1 Hz to 100 KHz, logarithmically spaced. // Four slide switches set rate at which the counter is incremented. // Counter value is displayed on the six 7 segment displays in hex. // - // // Module: test_seven_segments.v // // Objective: test module for drive_6_7segs.v // // Assumptions: 50 MHz input clock // DE10-Lite board // // Notes: // // This is a lot like a test bench, but this is intended for testing on // actual h/w, so it is synthesizable, and easily interfaces with switches // and the six 7 segment displays on a Terasic DE10-Lite board. // You should have received a copy of the GNU General Public License // along with this program. See the // GNU General Public License for more details. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - // // test_seven_segments.v - test module for drive_6_7segs.v // // Copyright (C) 2020 Michael Gansler // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |