1 |
67 |
rkastl |
-------------------------------------------------------------------------------
|
2 |
|
|
-- Title: Serially Programmable Clock Source ICS307
|
3 |
|
|
-- Project: FH-Hagenberg/HSSE: SET5
|
4 |
|
|
-- Author: Copyright 2006 by Friedrich Seebacher and Markus Pfaff,
|
5 |
|
|
-- Linz/Austria/Europe
|
6 |
|
|
-------------------------------------------------------------------------------
|
7 |
|
|
-- $LastChangedDate: 2007-01-09 08:40:02 +0100 (Di, 09 Jän 2007) $
|
8 |
|
|
-- $LastChangedRevision: 415 $
|
9 |
|
|
-- $LastChangedBy: pfaff $
|
10 |
|
|
-- $HeadURL: file:///C:/pfaff/rpySvn/rpySvnSet5/trunk/Uebung/W06Jg04/Uebung03/unitIcs307/src/ICS307-e.vhd $
|
11 |
|
|
-- LoginNames: pfaff - Markus Pfaff, Linz/Austria/Europe
|
12 |
|
|
-------------------------------------------------------------------------------
|
13 |
|
|
-- Description: This description mimics a subset of the behaviour of the ICS307-02
|
14 |
|
|
-- versatile serially programmable clock source. This device is used as main clock
|
15 |
|
|
-- source on the SandboxX rapid prototyping system in HSSE and ESD courses at
|
16 |
|
|
-- FH-OOe/Hagenberg.
|
17 |
|
|
-- Due to the limited resolution of VHDL simulators when not used with fs as smallest
|
18 |
|
|
-- grain of time the unit will not transition frequency in the smooth way you'll read from
|
19 |
|
|
-- the data sheet. Instead it will transition from the old frequency value to the new one
|
20 |
|
|
-- after the transitioning time is over in a few steps.
|
21 |
|
|
-- Transitioning will get smoother with smaller transition times (gClkFrequcenyTransitionTime).
|
22 |
|
|
-- A transition time of several microseconds is not realistic, but will lead to a smooth
|
23 |
|
|
-- transition in simulation even if the simulator is set to ps resolution.
|
24 |
|
|
-- If time resolution is set to the minimum value (1 fs) you'll see a nice
|
25 |
|
|
-- linear transition from one frequency to the other in your simulation.
|
26 |
|
|
-------------------------------------------------------------------------------
|
27 |
|
|
-- Not tested:
|
28 |
|
|
-- - Reconfiguring the ICS to a new frequency while the device is still transitioning.
|
29 |
|
|
-- - Reconfiguring the ICS several times
|
30 |
|
|
-------------------------------------------------------------------------------
|
31 |
|
|
|
32 |
|
|
library ieee;
|
33 |
|
|
use ieee.std_logic_1164.all;
|
34 |
|
|
use ieee.numeric_std.all;
|
35 |
|
|
|
36 |
|
|
entity ICS307 is
|
37 |
|
|
generic (
|
38 |
|
|
gInputFrequency : natural := 25E6; -- Reference input clock frequency [Hz]
|
39 |
|
|
gClkFrequcenyTransitionTime : time := 3 ms);
|
40 |
|
|
|
41 |
|
|
port (
|
42 |
|
|
-- SPI clock input
|
43 |
|
|
iSclk : in std_ulogic;
|
44 |
|
|
-- SPI data input
|
45 |
|
|
iData : in std_ulogic;
|
46 |
|
|
-- SPI strobe: latch data on falling edge of this signal
|
47 |
|
|
iStrobe : in std_ulogic;
|
48 |
|
|
-- Clock signal generated by this unit
|
49 |
|
|
oClk1 : out std_ulogic
|
50 |
|
|
);
|
51 |
|
|
end ICS307;
|