// // ddram.v // // DE10-nano DDR3 memory interface // // Copyright (c) 2017 Sorgelig // // // This source file 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. // // This source file 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. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ------------------------------------------ // // 8-bit version module ddram ( input reset, input DDRAM_CLK, input DDRAM_BUSY, output [7:0] DDRAM_BURSTCNT, output [28:0] DDRAM_ADDR, input [63:0] DDRAM_DOUT, input DDRAM_DOUT_READY, output DDRAM_RD, output [63:0] DDRAM_DIN, output [7:0] DDRAM_BE, output DDRAM_WE, input [27:0] addr, // 256MB at the end of 1GB output [7:0] dout, // data output to cpu input [7:0] din, // data input from cpu input we, // cpu requests write input rd, // cpu requests read output ready // dout is valid. Ready to accept new read/write. ); assign DDRAM_BURSTCNT = 1; assign DDRAM_BE = (8'd1<