Skip to content

Commit bf1e1e0

Browse files
committed
Initial Checkin of HDL and Stim directories
1 parent d07ac0c commit bf1e1e0

File tree

1,178 files changed

+6145347
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,178 files changed

+6145347
-0
lines changed

hdl/altera_clk_synth/bt_ddr_io.ppf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!DOCTYPE pinplan>
3+
<pinplan intended_family="Arria II GX" variation_name="bt_ddr_io" megafunction_name="ALTDDIO_OUT" specifies="all_ports">
4+
<global>
5+
<pin name="aclr" direction="input" scope="external" />
6+
<pin name="datain_h[0..0]" direction="input" scope="external" />
7+
<pin name="datain_l[0..0]" direction="input" scope="external" />
8+
<pin name="outclock" direction="input" scope="external" source="clock" />
9+
<pin name="dataout[0..0]" direction="output" scope="external" />
10+
11+
</global>
12+
</pinplan>

hdl/altera_clk_synth/bt_ddr_io.qip

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set_global_assignment -name IP_TOOL_NAME "ALTDDIO_OUT"
2+
set_global_assignment -name IP_TOOL_VERSION "12.1"
3+
set_global_assignment -name VERILOG_FILE [file join $::quartus(qip_path) "bt_ddr_io.v"]
4+
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "bt_ddr_io.ppf"]

hdl/altera_clk_synth/bt_ddr_io.v

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
// megafunction wizard: %ALTDDIO_OUT%
2+
// GENERATION: STANDARD
3+
// VERSION: WM1.0
4+
// MODULE: ALTDDIO_OUT
5+
6+
// ============================================================
7+
// File Name: bt_ddr_io.v
8+
// Megafunction Name(s):
9+
// ALTDDIO_OUT
10+
//
11+
// Simulation Library Files(s):
12+
// altera_mf
13+
// ============================================================
14+
// ************************************************************
15+
// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
16+
//
17+
// 12.1 Build 243 01/31/2013 SP 1.33 SJ Full Version
18+
// ************************************************************
19+
20+
21+
//Copyright (C) 1991-2012 Altera Corporation
22+
//Your use of Altera Corporation's design tools, logic functions
23+
//and other software and tools, and its AMPP partner logic
24+
//functions, and any output files from any of the foregoing
25+
//(including device programming or simulation files), and any
26+
//associated documentation or information are expressly subject
27+
//to the terms and conditions of the Altera Program License
28+
//Subscription Agreement, Altera MegaCore Function License
29+
//Agreement, or other applicable license agreement, including,
30+
//without limitation, that your use is for the sole purpose of
31+
//programming logic devices manufactured by Altera and sold by
32+
//Altera or its authorized distributors. Please refer to the
33+
//applicable agreement for further details.
34+
35+
36+
// synopsys translate_off
37+
`timescale 1 ps / 1 ps
38+
// synopsys translate_on
39+
module bt_ddr_io (
40+
aclr,
41+
datain_h,
42+
datain_l,
43+
outclock,
44+
dataout);
45+
46+
input aclr;
47+
input [0:0] datain_h;
48+
input [0:0] datain_l;
49+
input outclock;
50+
output [0:0] dataout;
51+
52+
wire [0:0] sub_wire0;
53+
wire [0:0] dataout = sub_wire0[0:0];
54+
55+
altddio_out ALTDDIO_OUT_component (
56+
.aclr (aclr),
57+
.datain_h (datain_h),
58+
.datain_l (datain_l),
59+
.outclock (outclock),
60+
.dataout (sub_wire0),
61+
.aset (1'b0),
62+
.oe (1'b1),
63+
.oe_out (),
64+
.outclocken (1'b1),
65+
.sclr (1'b0),
66+
.sset (1'b0));
67+
defparam
68+
ALTDDIO_OUT_component.extend_oe_disable = "OFF",
69+
ALTDDIO_OUT_component.intended_device_family = "Arria II GX",
70+
ALTDDIO_OUT_component.invert_output = "OFF",
71+
ALTDDIO_OUT_component.lpm_hint = "UNUSED",
72+
ALTDDIO_OUT_component.lpm_type = "altddio_out",
73+
ALTDDIO_OUT_component.oe_reg = "UNREGISTERED",
74+
ALTDDIO_OUT_component.power_up_high = "OFF",
75+
ALTDDIO_OUT_component.width = 1;
76+
77+
78+
endmodule
79+
80+
// ============================================================
81+
// CNX file retrieval info
82+
// ============================================================
83+
// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
84+
// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Arria II GX"
85+
// Retrieval info: CONSTANT: EXTEND_OE_DISABLE STRING "OFF"
86+
// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Arria II GX"
87+
// Retrieval info: CONSTANT: INVERT_OUTPUT STRING "OFF"
88+
// Retrieval info: CONSTANT: LPM_HINT STRING "UNUSED"
89+
// Retrieval info: CONSTANT: LPM_TYPE STRING "altddio_out"
90+
// Retrieval info: CONSTANT: OE_REG STRING "UNREGISTERED"
91+
// Retrieval info: CONSTANT: POWER_UP_HIGH STRING "OFF"
92+
// Retrieval info: CONSTANT: WIDTH NUMERIC "1"
93+
// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT NODEFVAL "aclr"
94+
// Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0
95+
// Retrieval info: USED_PORT: datain_h 0 0 1 0 INPUT NODEFVAL "datain_h[0..0]"
96+
// Retrieval info: CONNECT: @datain_h 0 0 1 0 datain_h 0 0 1 0
97+
// Retrieval info: USED_PORT: datain_l 0 0 1 0 INPUT NODEFVAL "datain_l[0..0]"
98+
// Retrieval info: CONNECT: @datain_l 0 0 1 0 datain_l 0 0 1 0
99+
// Retrieval info: USED_PORT: dataout 0 0 1 0 OUTPUT NODEFVAL "dataout[0..0]"
100+
// Retrieval info: CONNECT: dataout 0 0 1 0 @dataout 0 0 1 0
101+
// Retrieval info: USED_PORT: outclock 0 0 0 0 INPUT_CLK_EXT NODEFVAL "outclock"
102+
// Retrieval info: CONNECT: @outclock 0 0 0 0 outclock 0 0 0 0
103+
// Retrieval info: GEN_FILE: TYPE_NORMAL bt_ddr_io.v TRUE FALSE
104+
// Retrieval info: GEN_FILE: TYPE_NORMAL bt_ddr_io.qip TRUE FALSE
105+
// Retrieval info: GEN_FILE: TYPE_NORMAL bt_ddr_io.bsf FALSE TRUE
106+
// Retrieval info: GEN_FILE: TYPE_NORMAL bt_ddr_io_inst.v FALSE TRUE
107+
// Retrieval info: GEN_FILE: TYPE_NORMAL bt_ddr_io_bb.v FALSE TRUE
108+
// Retrieval info: GEN_FILE: TYPE_NORMAL bt_ddr_io.inc FALSE TRUE
109+
// Retrieval info: GEN_FILE: TYPE_NORMAL bt_ddr_io.cmp FALSE TRUE
110+
// Retrieval info: GEN_FILE: TYPE_NORMAL bt_ddr_io.ppf TRUE FALSE
111+
// Retrieval info: LIB_FILE: altera_mf

hdl/altera_clk_synth/build_file

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
clk_gen_ipll_stim.v
2+
clk_gen_ipll.v
3+
pix_pll.v
4+
pll_config_top.v
5+
pll_config_intf.v
6+
pll_config_pll.v
7+
8+
+libext+.vo+
9+
+libext+.v+
10+
11+
-v /home/edatools/altera_12.0/quartus/eda/sim_lib/arriaii_atoms.v
12+
-v /home/edatools/altera_12.0/quartus/eda/sim_lib/altera_primitives.v
13+
-v /home/edatools/altera_12.0/quartus/eda/sim_lib/sgate.v
14+
-v /home/edatools/altera_12.0/quartus/eda/sim_lib/220model.v
15+
-v /home/edatools/altera_12.0/quartus/eda/sim_lib/altera_mf.v
16+
17+
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/////////////////////////////////////////////////////////////////////////////
2+
//
3+
// Silicon Spectrum Corporation - All Rights Reserved
4+
// Copyright (C) 2005
5+
//
6+
// Title : Clock switch module for non programmable PLLs
7+
// File : clk_switch.v
8+
// Author : Jim MacLeod
9+
// Created : 05-Mar-2013
10+
// RCS File : $Source:$
11+
// Status : $Id:$
12+
//
13+
//
14+
//////////////////////////////////////////////////////////////////////////////
15+
//
16+
// Description :
17+
// This module takes in up to 6 PLL derived clocks plus a master clock (PCI).
18+
// This module allows the glitchless switching amongst the clock frequencies.
19+
// The purpose of this is to allow an FPGA w/o a programmable PLL
20+
// (ex Cyclone2) to provide us with a variety of frequencies for generating
21+
// Pixel clock and CRT clocks.
22+
//
23+
//////////////////////////////////////////////////////////////////////////////
24+
//
25+
// Modules Instantiated:
26+
//
27+
///////////////////////////////////////////////////////////////////////////////
28+
//
29+
// Modification History:
30+
//
31+
// $Log:$
32+
//
33+
//
34+
///////////////////////////////////////////////////////////////////////////////
35+
///////////////////////////////////////////////////////////////////////////////
36+
`timescale 1 ns / 10 ps
37+
38+
module clk_gen_ipll
39+
(
40+
input hb_clk,
41+
input hb_resetn,
42+
input refclk,
43+
input [1:0] bpp,
44+
input vga_mode,
45+
input write_param, // input
46+
input [3:0] counter_type, // input [3:0]
47+
input [2:0] counter_param, // input[2:0]
48+
input [8:0] data_in, // input [8:0],
49+
input reconfig, // input.
50+
input pll_areset_in, // input.
51+
52+
output busy, // Input busy.
53+
output pix_clk,
54+
output pix_clk_vga,
55+
output reg crt_clk,
56+
output pix_locked
57+
);
58+
59+
pix_pll_rc_top u_pix_pll_rc_top
60+
(
61+
.hb_clk (hb_clk),
62+
.hb_rstn (hb_resetn),
63+
.ref_clk (refclk),
64+
.reconfig (reconfig),
65+
.write_param (write_param),
66+
.counter_param (counter_param),// Input [2:0]
67+
.counter_type (counter_type), // Input [3:0]
68+
.data_in (data_in), // Input [8:0]
69+
.pll_areset_in (pll_areset_in),
70+
71+
.busy (busy), // output.
72+
.pix_clk (pix_clk), // output.
73+
.pix_locked (pix_locked) // output.
74+
);
75+
76+
77+
reg [2:0] crt_counter;
78+
reg [1:0] crt_divider;
79+
80+
always @*
81+
begin
82+
casex({vga_mode, bpp})
83+
3'b1_xx: crt_divider = 2'b00;
84+
3'b0_01: crt_divider = 2'b10;
85+
3'b0_10: crt_divider = 2'b01;
86+
default: crt_divider = 2'b00;
87+
endcase
88+
end
89+
90+
always @(posedge pix_clk or negedge hb_resetn)
91+
begin
92+
if(!hb_resetn)
93+
begin
94+
crt_clk <= 1'b1;
95+
crt_counter <= 3'b000;
96+
end
97+
else begin
98+
crt_counter <= crt_counter + 3'h1;
99+
case (crt_divider)
100+
0: crt_clk <= 1'b1;
101+
1: crt_clk <= ~crt_counter[0];
102+
2: crt_clk <= ~|crt_counter[1:0];
103+
3: crt_clk <= ~|crt_counter[2:0];
104+
endcase
105+
end
106+
end
107+
108+
endmodule
109+

0 commit comments

Comments
 (0)