/* Wishlist in order of importance and practicality. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 GPIO hard wired 2 U(S)ART hard wired or SPCx 3 video hard wired or SPCx 4 PS/2 hard wired 5 32b timer hard wired 6 2x 16b timers hard wired 7 PWM timer hard wired 8 LED driver hard wired 9 sound hard wired or SPCx 10 DMA hard wired 11 USB hard wired or SPCx 12 Ethernet (SPCx or 16BC) with hard wired 13 3x FPGA or SPCx peripheral hard wired or SPCx 14 LPC decoder? hard wired or SPCx 15 LPC coder? hard wired or SPCx 16 FPU hard wired or SPCx or 16BC 17 RTC (RFC 2550 complient) external 18 mass storage external xx All-in-one serial communication module. Not sure where to put this. */ //GPIO module GPIO( input clk, input out, input in, inout [15:0] data, inout [15:0] GPIO0, inout [15:0] GPIO1 ); reg [15:0] GPIOCR0 = 16'h0000; reg [15:0] GPIOR0 = 16'h0000; reg [15:0] GPIOCR1 = 16'h0000; reg [15:0] GPIOR1 = 16'h0000; assign data = (in & (addr == 16'hFE00)) ? GPIOR0 : 16'hz; assign data = (in & (addr == 16'hFE01)) ? GPIOCR0 : 16'hz; assign data = (in & (addr == 16'hFE02)) ? GPIOR1 : 16'hz; assign data = (in & (addr == 16'hFE03)) ? GPIOCR1 : 16'hz; always @(posedge clk) begin if (reset) begin GPIOCR0 <= 16'bz; GPIOR0 <= 16'b0000; end else if (out) begin if (addr == 16'hFE00) begin GPIOR0 <= data; end else if (addr == 16'hFE01) begin GPIOCR0 <= data; end end end always @(posedge clk) begin if (reset) begin GPIOCR1 <= 16'bz; GPIOR1 <= 16'b0000; end else if (out) begin if (addr == 16'hFE02) begin GPIOR1 <= data; end else if (addr == 16'hFE03) begin GPIOCR1 <= data; end end end endmodule module USART( input clk, input RxD, input CTS, inout [15:0] data, inout SCLK, output TxD, output RTS ); endmodule