/* * hub75_phy.v * * vim: ts=4 sw=4 * * Copyright (C) 2019 Sylvain Munaut * Copyright (C) 2019 Piotr Esden-Tempski * All rights reserved. * * LGPL v3+, see LICENSE.lgpl3 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * 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. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ `default_nettype none module hub75_phy #( parameter integer N_BANKS = 2, parameter integer N_ROWS = 32, parameter integer N_CHANS = 3, // Auto-set parameter integer LOG_N_ROWS = $clog2(N_ROWS) )( // Hub75 interface pads output wire [LOG_N_ROWS-1:0] hub75_addr, output wire [(N_BANKS*N_CHANS)-1:0] hub75_data, output wire hub75_clk, output wire hub75_le, output wire hub75_blank, // PHY interface signals input wire [LOG_N_ROWS-1:0] phy_addr, input wire [(N_BANKS*N_CHANS)-1:0] phy_data, input wire phy_clk, input wire phy_le, input wire phy_blank, // Clock / Reset input wire clk, input wire rst ); genvar i; // Signals reg phy_clk_f; // Address generate for (i=0; i