fmcomms2: Use ad_iobuf instance on system_top

Use ad_iobuf instance on system top, instead of separate IOBUF instances.
main
Istvan Csomortani 2014-10-10 18:45:39 +03:00
parent e21d26e456
commit ca4c961891
6 changed files with 62 additions and 165 deletions

View File

@ -8,6 +8,7 @@ adi_project_create fmcomms2_zc702
adi_project_files fmcomms2_zc702 [list \
"system_top.v" \
"system_constr.xdc"\
"$ad_hdl_dir/library/common/ad_iobuf.v" \
"$ad_hdl_dir/projects/common/zc702/zc702_system_constr.xdc" ]
adi_project_run fmcomms2_zc702

View File

@ -171,62 +171,33 @@ module system_top (
wire [48:0] gpio_o;
wire [48:0] gpio_t;
wire spi_udc_csn_tx;
wire spi_udc_csn_rx;
wire spi_udc_sclk;
wire spi_udc_data;
// instantiations
IOBUF i_iobuf_gpio_txnrx (
.I (gpio_o[48]),
.O (gpio_i[48]),
.T (gpio_t[48]),
.IO (gpio_txnrx));
ad_iobuf #(.DATA_WIDTH(29)) i_iobuf (
.dt ({gpio_t[48:32],gpio_t[15:8], gpio_t[3:0]}),
.di ({gpio_o[48:32],gpio_o[15:8], gpio_o[3:0]}),
.do ({gpio_i[48:32],gpio_i[15:8], gpio_i[3:0]}),
.dio({ gpio_txnrx,
gpio_enable,
gpio_resetb,
gpio_sync,
gpio_en_agc,
gpio_ctl,
gpio_status,
gpio_bd[15:8],
gpio_bd[3:0]}));
IOBUF i_iobuf_gpio_enable (
.I (gpio_o[47]),
.O (gpio_i[47]),
.T (gpio_t[47]),
.IO (gpio_enable));
IOBUF i_iobuf_gpio_resetb (
.I (gpio_o[46]),
.O (gpio_i[46]),
.T (gpio_t[46]),
.IO (gpio_resetb));
IOBUF i_iobuf_gpio_sync (
.I (gpio_o[45]),
.O (gpio_i[45]),
.T (gpio_t[45]),
.IO (gpio_sync));
IOBUF i_iobuf_gpio_en_agc (
.I (gpio_o[44]),
.O (gpio_i[44]),
.T (gpio_t[44]),
.IO (gpio_en_agc));
genvar n;
generate
for (n = 0; n <= 3; n = n + 1) begin: g_iobuf_gpio_ctl
IOBUF i_iobuf_gpio_ctl (
.I (gpio_o[40+n]),
.O (gpio_i[40+n]),
.T (gpio_t[40+n]),
.IO (gpio_ctl[n]));
end
for (n = 0; n <= 7; n = n + 1) begin: g_iobuf_gpio_status
IOBUF i_iobuf_gpio_status (
.I (gpio_o[32+n]),
.O (gpio_i[32+n]),
.T (gpio_t[32+n]),
.IO (gpio_status[n]));
end
for (n = 0; n <= 15; n = n + 1) begin: g_iobuf_gpio_bd
IOBUF i_iobuf_gpio_bd (
.I (gpio_o[n]),
.O (gpio_i[n]),
.T (gpio_t[n]),
.IO (gpio_bd[n]));
end
endgenerate
// udc spi is just output and connected PMOD2_x_LS
ad_iobuf #(.DATA_WIDTH(4)) i_iobuf_spi (
.dt ({4'd0}),
.di ({spi_udc_csn_tx, spi_udc_csn_rx, spi_udc_data, spi_udc_sclk}),
.do (),
.dio(gpio_bd[7:4]));
system_wrapper i_system_wrapper (
.DDR_addr (DDR_addr),
@ -268,7 +239,7 @@ module system_top (
.rx_frame_in_p (rx_frame_in_p),
.spdif (spdif),
.spi_csn_i (1'b1),
.spi_csn_o (spi_csn),
.spi_csn_o (spi_csn),
.spi_miso_i (spi_miso),
.spi_mosi_i (1'b0),
.spi_mosi_o (spi_mosi),

View File

@ -8,6 +8,7 @@ adi_project_create fmcomms2_zc706
adi_project_files fmcomms2_zc706 [list \
"system_top.v" \
"system_constr.xdc"\
"$ad_hdl_dir/library/common/ad_iobuf.v" \
"$ad_hdl_dir/projects/common/zc706/zc706_system_constr.xdc" ]
adi_project_run fmcomms2_zc706

View File

@ -173,60 +173,18 @@ module system_top (
// instantiations
IOBUF i_iobuf_gpio_txnrx (
.I (gpio_o[48]),
.O (gpio_i[48]),
.T (gpio_t[48]),
.IO (gpio_txnrx));
IOBUF i_iobuf_gpio_enable (
.I (gpio_o[47]),
.O (gpio_i[47]),
.T (gpio_t[47]),
.IO (gpio_enable));
IOBUF i_iobuf_gpio_resetb (
.I (gpio_o[46]),
.O (gpio_i[46]),
.T (gpio_t[46]),
.IO (gpio_resetb));
IOBUF i_iobuf_gpio_sync (
.I (gpio_o[45]),
.O (gpio_i[45]),
.T (gpio_t[45]),
.IO (gpio_sync));
IOBUF i_iobuf_gpio_en_agc (
.I (gpio_o[44]),
.O (gpio_i[44]),
.T (gpio_t[44]),
.IO (gpio_en_agc));
genvar n;
generate
for (n = 0; n <= 3; n = n + 1) begin: g_iobuf_gpio_ctl
IOBUF i_iobuf_gpio_ctl (
.I (gpio_o[40+n]),
.O (gpio_i[40+n]),
.T (gpio_t[40+n]),
.IO (gpio_ctl[n]));
end
for (n = 0; n <= 7; n = n + 1) begin: g_iobuf_gpio_status
IOBUF i_iobuf_gpio_status (
.I (gpio_o[32+n]),
.O (gpio_i[32+n]),
.T (gpio_t[32+n]),
.IO (gpio_status[n]));
end
for (n = 0; n <= 14; n = n + 1) begin: g_iobuf_gpio_bd
IOBUF i_iobuf_gpio_bd (
.I (gpio_o[n]),
.O (gpio_i[n]),
.T (gpio_t[n]),
.IO (gpio_bd[n]));
end
endgenerate
ad_iobuf #(.DATA_WIDTH(32)) i_iobuf (
.dt ({gpio_t[48:32],gpio_t[14:0]}),
.di ({gpio_o[48:32],gpio_o[14:0]}),
.do ({gpio_i[48:32],gpio_i[14:0]}),
.dio({ gpio_txnrx,
gpio_enable,
gpio_resetb,
gpio_sync,
gpio_en_agc,
gpio_ctl,
gpio_status,
gpio_bd}));
system_wrapper i_system_wrapper (
.DDR_addr (DDR_addr),

View File

@ -8,6 +8,7 @@ adi_project_create fmcomms2_zed
adi_project_files fmcomms2_zed [list \
"system_top.v" \
"system_constr.xdc"\
"$ad_hdl_dir/library/common/ad_iobuf.v" \
"$ad_hdl_dir/projects/common/zed/zed_system_constr.xdc" ]
adi_project_run fmcomms2_zed

View File

@ -199,65 +199,30 @@ module system_top (
// instantiations
IOBUF i_iobuf_gpio_txnrx (
.I (gpio_o[48]),
.O (gpio_i[48]),
.T (gpio_t[48]),
.IO (gpio_txnrx));
ad_iobuf #(.DATA_WIDTH(49)) i_iobuf_gpio (
.dt ({gpio_t[48:0]}),
.di ({gpio_o[48:0]}),
.do ({gpio_i[48:0]}),
.dio({ gpio_txnrx,
gpio_enable,
gpio_resetb,
gpio_sync,
gpio_en_agc,
gpio_ctl,
gpio_status,
gpio_bd}));
IOBUF i_iobuf_gpio_enable (
.I (gpio_o[47]),
.O (gpio_i[47]),
.T (gpio_t[47]),
.IO (gpio_enable));
ad_iobuf #(.DATA_WIDTH(2)) i_iobuf_iic_scl (
.dt (iic_mux_scl_t_s),
.di (iic_mux_scl_i_s),
.do (iic_mux_scl_o_s),
.dio(iic_mux_scl));
IOBUF i_iobuf_gpio_resetb (
.I (gpio_o[46]),
.O (gpio_i[46]),
.T (gpio_t[46]),
.IO (gpio_resetb));
IOBUF i_iobuf_gpio_sync (
.I (gpio_o[45]),
.O (gpio_i[45]),
.T (gpio_t[45]),
.IO (gpio_sync));
IOBUF i_iobuf_gpio_en_agc (
.I (gpio_o[44]),
.O (gpio_i[44]),
.T (gpio_t[44]),
.IO (gpio_en_agc));
genvar n;
generate
for (n = 0; n <= 3; n = n + 1) begin: g_iobuf_gpio_ctl
IOBUF i_iobuf_gpio_ctl (
.I (gpio_o[40+n]),
.O (gpio_i[40+n]),
.T (gpio_t[40+n]),
.IO (gpio_ctl[n]));
end
for (n = 0; n <= 7; n = n + 1) begin: g_iobuf_gpio_status
IOBUF i_iobuf_gpio_status (
.I (gpio_o[32+n]),
.O (gpio_i[32+n]),
.T (gpio_t[32+n]),
.IO (gpio_status[n]));
end
for (n = 0; n <= 31; n = n + 1) begin: g_iobuf_gpio_bd
IOBUF i_iobuf_gpio_bd (
.I (gpio_o[n]),
.O (gpio_i[n]),
.T (gpio_t[n]),
.IO (gpio_bd[n]));
end
endgenerate
IOBUF i_iic_mux_scl_0 (.I(iic_mux_scl_o_s[0]), .O(iic_mux_scl_i_s[0]), .T(iic_mux_scl_t_s), .IO(iic_mux_scl[0]));
IOBUF i_iic_mux_scl_1 (.I(iic_mux_scl_o_s[1]), .O(iic_mux_scl_i_s[1]), .T(iic_mux_scl_t_s), .IO(iic_mux_scl[1]));
IOBUF i_iic_mux_sda_0 (.I(iic_mux_sda_o_s[0]), .O(iic_mux_sda_i_s[0]), .T(iic_mux_sda_t_s), .IO(iic_mux_sda[0]));
IOBUF i_iic_mux_sda_1 (.I(iic_mux_sda_o_s[1]), .O(iic_mux_sda_i_s[1]), .T(iic_mux_sda_t_s), .IO(iic_mux_sda[1]));
ad_iobuf #(.DATA_WIDTH(2)) i_iobuf_iic_sda (
.dt (iic_mux_sda_t_s),
.di (iic_mux_sda_i_s),
.do (iic_mux_sda_o_s),
.dio(iic_mux_sda));
system_wrapper i_system_wrapper (
.DDR_addr (DDR_addr),