/** * ss_Control.phdl * * This serves as the top-level design for the * seven segment controller. The design consists * of a seven segment display where each segment * is lit by flipping its respective switch. * * @author Richard Black * @version 2.0 * @layout EAGLE PCB */ design ss_Control { net gnd, vcc; net[1:8] segs, r2sw; // The power supply inst source of Battery { pos = vcc; neg = gnd; } // The seven segment display inst segment of SevenSeg { segments = segs; anode = ; } // The switches to control the display inst(1:8) swArray of Switch { combine(a) = r2sw; combine(b) = segs; } // The resistors used to drain current so that // the leds don't burn out. inst(1:8) rArray of Resistor { attr VALUE = "120"; combine(a) = r2sw; b = gnd; } }