##// END OF EJS Templates
update APB_REG
pellion -
r373:8b7232d194b4 JC
parent child
Show More
@@ -1,436 +1,439
1 VHDLIB=../..
1 VHDLIB=../..
2 SCRIPTSDIR=$(VHDLIB)/scripts/
2 SCRIPTSDIR=$(VHDLIB)/scripts/
3
3
4 GRLIB := $(shell sh $(VHDLIB)/scripts/lpp_relpath.sh)
4 GRLIB := $(shell sh $(VHDLIB)/scripts/lpp_relpath.sh)
5 TOP=TB
5 TOP=TB
6
6
7 CMD_VLIB=vlib
7 CMD_VLIB=vlib
8 CMD_VMAP=vmap
8 CMD_VMAP=vmap
9 CMD_VCOM=@vcom -quiet -93 -work
9 CMD_VCOM=@vcom -quiet -93 -work
10
10
11 ################## project specific targets ##########################
11 ################## project specific targets ##########################
12
12
13 all:
13 all:
14 @echo "make vsim"
14 @echo "make vsim"
15 @echo "make libs"
15 @echo "make libs"
16 @echo "make clean"
16 @echo "make clean"
17 @echo "make vcom_grlib vcom_lpp vcom_tb"
17 @echo "make vcom_grlib vcom_lpp vcom_tb"
18
18
19 run:
19 run:
20 @vsim work.TB -do run.do
20 @vsim work.TB -do run.do
21 # @vsim work.TB
21 # @vsim work.TB
22 # @vsim lpp.lpp_lfr_ms
22 # @vsim lpp.lpp_lfr_ms
23
23
24 vsim: libs vcom run
24 vsim: libs vcom run
25
25
26 libs:
26 libs:
27 @$(CMD_VLIB) modelsim
27 @$(CMD_VLIB) modelsim
28 @$(CMD_VMAP) modelsim modelsim
28 @$(CMD_VMAP) modelsim modelsim
29 @$(CMD_VLIB) modelsim/techmap
29 @$(CMD_VLIB) modelsim/techmap
30 @$(CMD_VMAP) techmap modelsim/techmap
30 @$(CMD_VMAP) techmap modelsim/techmap
31 @$(CMD_VLIB) modelsim/grlib
31 @$(CMD_VLIB) modelsim/grlib
32 @$(CMD_VMAP) grlib modelsim/grlib
32 @$(CMD_VMAP) grlib modelsim/grlib
33 @$(CMD_VLIB) modelsim/gaisler
33 @$(CMD_VLIB) modelsim/gaisler
34 @$(CMD_VMAP) gaisler modelsim/gaisler
34 @$(CMD_VMAP) gaisler modelsim/gaisler
35 @$(CMD_VLIB) modelsim/work
35 @$(CMD_VLIB) modelsim/work
36 @$(CMD_VMAP) work modelsim/work
36 @$(CMD_VMAP) work modelsim/work
37 @$(CMD_VLIB) modelsim/lpp
37 @$(CMD_VLIB) modelsim/lpp
38 @$(CMD_VMAP) lpp modelsim/lpp
38 @$(CMD_VMAP) lpp modelsim/lpp
39 @echo "libs done"
39 @echo "libs done"
40
40
41
41
42 clean:
42 clean:
43 @rm -Rf modelsim
43 @rm -Rf modelsim
44 @rm -Rf modelsim.ini
44 @rm -Rf modelsim.ini
45 @rm -Rf *~
45 @rm -Rf *~
46 @rm -Rf transcript
46 @rm -Rf transcript
47 @rm -Rf wlft*
47 @rm -Rf wlft*
48 @rm -Rf *.wlf
48 @rm -Rf *.wlf
49 @rm -Rf vish_stacktrace.vstf
49 @rm -Rf vish_stacktrace.vstf
50 @rm -Rf libs.do
50 @rm -Rf libs.do
51
51
52 vcom: vcom_grlib vcom_techmap vcom_gaisler vcom_lpp vcom_tb
52 vcom: vcom_grlib vcom_techmap vcom_gaisler vcom_lpp vcom_tb
53
53
54
54
55 vcom_tb:
55 vcom_tb:
56 ## $(CMD_VCOM) lpp lpp_memory.vhd
56 ## $(CMD_VCOM) lpp lpp_memory.vhd
57 ## $(CMD_VCOM) lpp lppFIFOxN.vhd
57 ## $(CMD_VCOM) lpp lppFIFOxN.vhd
58 ## $(CMD_VCOM) lpp lpp_FIFO.vhd
58 ## $(CMD_VCOM) lpp lpp_FIFO.vhd
59 ## $(CMD_VCOM) lpp lpp_lfr_ms.vhd
59 ## $(CMD_VCOM) lpp lpp_lfr_ms.vhd
60 $(CMD_VCOM) work TB.vhd
60 $(CMD_VCOM) work TB.vhd
61 @echo "vcom done"
61 @echo "vcom done"
62
62
63 vcom_grlib:
63 vcom_grlib:
64 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/stdlib/version.vhd
64 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/stdlib/version.vhd
65 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/stdlib/config_types.vhd
65 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/stdlib/config_types.vhd
66 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/stdlib/config.vhd
66 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/stdlib/config.vhd
67 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/stdlib/stdlib.vhd
67 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/stdlib/stdlib.vhd
68 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/stdlib/stdio.vhd
68 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/stdlib/stdio.vhd
69 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/stdlib/testlib.vhd
69 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/stdlib/testlib.vhd
70 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/ftlib/mtie_ftlib.vhd
70 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/ftlib/mtie_ftlib.vhd
71 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/util/util.vhd
71 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/util/util.vhd
72 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/sparc/sparc.vhd
72 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/sparc/sparc.vhd
73 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/sparc/sparc_disas.vhd
73 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/sparc/sparc_disas.vhd
74 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/sparc/cpu_disas.vhd
74 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/sparc/cpu_disas.vhd
75 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/modgen/multlib.vhd
75 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/modgen/multlib.vhd
76 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/modgen/leaves.vhd
76 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/modgen/leaves.vhd
77 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/amba.vhd
77 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/amba.vhd
78 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/devices.vhd
78 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/devices.vhd
79 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/defmst.vhd
79 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/defmst.vhd
80 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/apbctrl.vhd
80 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/apbctrl.vhd
81 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/ahbctrl.vhd
81 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/ahbctrl.vhd
82 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/dma2ahb_pkg.vhd
82 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/dma2ahb_pkg.vhd
83 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/dma2ahb.vhd
83 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/dma2ahb.vhd
84 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/ahbmst.vhd
84 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/ahbmst.vhd
85 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/ahbmon.vhd
85 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/ahbmon.vhd
86 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/apbmon.vhd
86 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/apbmon.vhd
87 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/ambamon.vhd
87 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/ambamon.vhd
88 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/dma2ahb_tp.vhd
88 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/dma2ahb_tp.vhd
89 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/amba_tp.vhd
89 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/amba/amba_tp.vhd
90 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_pkg.vhd
90 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_pkg.vhd
91 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_ahb_mst_pkg.vhd
91 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_ahb_mst_pkg.vhd
92 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_ahb_slv_pkg.vhd
92 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_ahb_slv_pkg.vhd
93 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_util.vhd
93 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_util.vhd
94 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_ahb_mst.vhd
94 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_ahb_mst.vhd
95 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_ahb_slv.vhd
95 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_ahb_slv.vhd
96 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_ahbs.vhd
96 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_ahbs.vhd
97 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_ahb_ctrl.vhd
97 $(CMD_VCOM) grlib $(GRLIB)/lib/grlib/atf/at_ahb_ctrl.vhd
98 @echo "vcom grlib done"
98 @echo "vcom grlib done"
99
99
100 vcom_gaisler:
100 vcom_gaisler:
101 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/arith/arith.vhd
101 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/arith/arith.vhd
102 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/arith/mul32.vhd
102 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/arith/mul32.vhd
103 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/arith/div32.vhd
103 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/arith/div32.vhd
104 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/memctrl.vhd
104 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/memctrl.vhd
105 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/sdctrl.vhd
105 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/sdctrl.vhd
106 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/sdctrl64.vhd
106 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/sdctrl64.vhd
107 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/sdmctrl.vhd
107 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/sdmctrl.vhd
108 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/srctrl.vhd
108 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/srctrl.vhd
109 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ssrctrl.vhd
109 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ssrctrl.vhd
110 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftsrctrlc.vhd
110 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftsrctrlc.vhd
111 # # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftsrctrl.vhd
111 # # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftsrctrl.vhd
112 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftsdctrl.vhd
112 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftsdctrl.vhd
113 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftsdmctrl.vhd
113 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftsdmctrl.vhd
114 # # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftmctrlc.vhd
114 # # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftmctrlc.vhd
115 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftsrctrl8.vhd
115 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftsrctrl8.vhd
116 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftsdmctrlx.vhd
116 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftsdmctrlx.vhd
117 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftmctrlcx.vhd
117 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftmctrlcx.vhd
118 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftmctrl.vhd
118 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftmctrl.vhd
119 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftsdctrl64.vhd
119 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/memctrl/ftsdctrl64.vhd
120 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/grlfpu/mtie_grlfpu.vhd
120 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/grlfpu/mtie_grlfpu.vhd
121 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/grlfpc/mtie_grlfpc.vhd
121 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/grlfpc/mtie_grlfpc.vhd
122 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/grlfpcft/mtie_grlfpcft.vhd
122 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/grlfpcft/mtie_grlfpcft.vhd
123 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmuconf# ig.vhd
123 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmuconf# ig.vhd
124 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmuiface.vhd
124 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmuiface.vhd
125 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/libmmu.vhd
125 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/libmmu.vhd
126 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmutlbcam.vhd
126 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmutlbcam.vhd
127 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmulrue.vhd
127 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmulrue.vhd
128 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmulru.vhd
128 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmulru.vhd
129 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmutlb.vhd
129 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmutlb.vhd
130 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmutw.vhd
130 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmutw.vhd
131 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmu.vhd
131 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/srmmu/mmu.vhd
132 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/leon3.vhd
132 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/leon3.vhd
133 # # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/libiu.vhd
133 # # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/libiu.vhd
134 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/libcache.vhd
134 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/libcache.vhd
135 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/tbufmem.vhd
135 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/tbufmem.vhd
136 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/dsu3x.vhd
136 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/dsu3x.vhd
137 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/dsu3.vhd
137 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/dsu3.vhd
138 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/dsu3_2x.vhd
138 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/dsu3_2x.vhd
139 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/clk2xsync.vhd
139 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/clk2xsync.vhd
140 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/clk2xqual.vhd
140 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/clk2xqual.vhd
141 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/grfpushwx.vhd
141 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3/grfpushwx.vhd
142 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/libproc3.vhd
142 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/libproc3.vhd
143 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/cachemem.vhd
143 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/cachemem.vhd
144 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/mmu_icache.vhd
144 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/mmu_icache.vhd
145 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/mmu_dcache.vhd
145 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/mmu_dcache.vhd
146 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/mmu_acache.vhd
146 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/mmu_acache.vhd
147 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/mmu_cache.vhd
147 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/mmu_cache.vhd
148 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/iu3.vhd
148 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/iu3.vhd
149 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/grfpwx.vhd
149 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/grfpwx.vhd
150 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/mfpwx.vhd
150 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/mfpwx.vhd
151 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/grlfpwx.vhd
151 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/grlfpwx.vhd
152 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/proc3.vhd
152 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/proc3.vhd
153 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/leon3s2x.vhd
153 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/leon3s2x.vhd
154 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/leon3s.vhd
154 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/leon3s.vhd
155 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/leon3cg.vhd
155 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/leon3cg.vhd
156 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/grfpwxsh.vhd
156 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/grfpwxsh.vhd
157 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/leon3sh.vhd
157 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3v1/leon3sh.vhd
158 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3ftv2/mtie_leon3ftv2.vhd
158 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/leon3ftv2/mtie_leon3ftv2.vhd
159 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/irqmp/irqmp2x.vhd
159 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/irqmp/irqmp2x.vhd
160 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/irqmp/irqmp.vhd
160 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/irqmp/irqmp.vhd
161 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/irqmp/irqamp.vhd
161 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/irqmp/irqamp.vhd
162 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/irqmp/irqamp2x.vhd
162 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/irqmp/irqamp2x.vhd
163 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/can.vhd
163 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/can.vhd
164 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/can_mod.vhd
164 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/can_mod.vhd
165 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/can_oc.vhd
165 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/can_oc.vhd
166 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/can_mc.vhd
166 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/can_mc.vhd
167 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/canmux.vhd
167 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/canmux.vhd
168 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/can_rd.vhd
168 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/can_rd.vhd
169 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/can_oc_core.vhd
169 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/can_oc_core.vhd
170 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/grcan.vhd
170 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/can/grcan.vhd
171 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/misc.vhd
171 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/misc.vhd
172 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/rstgen.vhd
172 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/rstgen.vhd
173 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/gptimer.vhd
173 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/gptimer.vhd
174 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbram.vhd
174 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbram.vhd
175 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbdpram.vhd
175 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbdpram.vhd
176 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbtrace.vhd
176 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbtrace.vhd
177 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbtrace_mb.vhd
177 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbtrace_mb.vhd
178 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbtrace_mmb.vhd
178 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbtrace_mmb.vhd
179 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grgpio.vhd
179 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grgpio.vhd
180 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ftahbram.vhd
180 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ftahbram.vhd
181 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ftahbram2.vhd
181 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ftahbram2.vhd
182 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbstat.vhd
182 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbstat.vhd
183 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/logan.vhd
183 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/logan.vhd
184 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/apbps2.vhd
184 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/apbps2.vhd
185 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/charrom_package.vhd
185 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/charrom_package.vhd
186 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/charrom.vhd
186 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/charrom.vhd
187 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/apbvga.vhd
187 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/apbvga.vhd
188 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahb2ahb.vhd
188 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahb2ahb.vhd
189 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbbridge.vhd
189 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbbridge.vhd
190 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/svgactrl.vhd
190 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/svgactrl.vhd
191 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grfifo.vhd
191 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grfifo.vhd
192 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/gradcdac.vhd
192 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/gradcdac.vhd
193 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grsysmon.vhd
193 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grsysmon.vhd
194 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/gracectrl.vhd
194 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/gracectrl.vhd
195 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grgpreg.vhd
195 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grgpreg.vhd
196 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbmst2.vhd
196 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbmst2.vhd
197 ## $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/memscrub.vhd
197 ## $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/memscrub.vhd
198 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahb_mst_iface.vhd
198 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahb_mst_iface.vhd
199 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grgprbank.vhd
199 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grgprbank.vhd
200 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grclkgate.vhd
200 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grclkgate.vhd
201 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grclkgate2x.vhd
201 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grclkgate2x.vhd
202 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grtimer.vhd
202 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grtimer.vhd
203 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grpulse.vhd
203 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grpulse.vhd
204 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grversion.vhd
204 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/grversion.vhd
205 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbfrom.vhd
205 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/misc/ahbfrom.vhd
206 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/ambatest/ahbtbp.vhd
206 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/ambatest/ahbtbp.vhd
207 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/ambatest/ahbtbm.vhd
207 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/ambatest/ahbtbm.vhd
208 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/net/net.vhd
208 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/net/net.vhd
209 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/uart/uart.vhd
209 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/uart/uart.vhd
210 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/uart/libdcom.vhd
210 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/uart/libdcom.vhd
211 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/uart/apbuart.vhd
211 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/uart/apbuart.vhd
212 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/uart/dcom.vhd
212 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/uart/dcom.vhd
213 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/uart/dcom_uart.vhd
213 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/uart/dcom_uart.vhd
214 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/uart/ahbuart.vhd
214 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/uart/ahbuart.vhd
215 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/sim.vhd
215 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/sim.vhd
216 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/sram.vhd
216 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/sram.vhd
217 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/sramft.vhd
217 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/sramft.vhd
218 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/sram16.vhd
218 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/sram16.vhd
219 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/phy.vhd
219 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/phy.vhd
220 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/ahbrep.vhd
220 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/ahbrep.vhd
221 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/delay_wire.vhd
221 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/delay_wire.vhd
222 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/pwm_check.vhd
222 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/pwm_check.vhd
223 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/ramback.vhd
223 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/ramback.vhd
224 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/zbtssram.vhd
224 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/zbtssram.vhd
225 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/slavecheck.vhd
225 $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/sim/slavecheck.vhd
226 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/jtag.vhd
226 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/jtag.vhd
227 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/libjtagcom.vhd
227 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/libjtagcom.vhd
228 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/jtagcom.vhd
228 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/jtagcom.vhd
229 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/ahbjtag.vhd
229 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/ahbjtag.vhd
230 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/ahbjtag_bsd.vhd
230 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/ahbjtag_bsd.vhd
231 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/bscanctrl.vhd
231 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/bscanctrl.vhd
232 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/bscanregs.vhd
232 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/bscanregs.vhd
233 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/bscanregsbd.vhd
233 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/bscanregsbd.vhd
234 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/jtagtst.vhd
234 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/jtag/jtagtst.vhd
235 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/greth/ethernet_mac.vhd
235 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/greth/ethernet_mac.vhd
236 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/greth/greth.vhd
236 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/greth/greth.vhd
237 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/greth/greth_mb.vhd
237 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/greth/greth_mb.vhd
238 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/greth/greth_gbit.vhd
238 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/greth/greth_gbit.vhd
239 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/greth/greth_gbit_mb.vhd
239 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/greth/greth_gbit_mb.vhd
240 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/greth/grethm.vhd
240 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/greth/grethm.vhd
241 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/greth/rgmii.vhd
241 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/greth/rgmii.vhd
242 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/spacewire/spacewire.vhd
242 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/spacewire/spacewire.vhd
243 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/spacewire/grspw.vhd
243 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/spacewire/grspw.vhd
244 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/spacewire/grspw2.vhd
244 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/spacewire/grspw2.vhd
245 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/spacewire/grspwm.vhd
245 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/spacewire/grspwm.vhd
246 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/spacewire/grspw2_phy.vhd
246 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/spacewire/grspw2_phy.vhd
247 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/spacewire/grspw_phy.vhd
247 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/spacewire/grspw_phy.vhd
248 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/gr1553b/gr1553b_pkg.vhd
248 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/gr1553b/gr1553b_pkg.vhd
249 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/gr1553b/gr1553b_pads.vhd
249 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/gr1553b/gr1553b_pads.vhd
250 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/gr1553b/simtrans1553.vhd
250 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/gr1553b/simtrans1553.vhd
251 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/nand/nandpkg.vhd
251 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/nand/nandpkg.vhd
252 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/nand/nandfctrlx.vhd
252 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/nand/nandfctrlx.vhd
253 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/nand/nandfctrl.vhd
253 # $(CMD_VCOM) gaisler $(GRLIB)/lib/gaisler/nand/nandfctrl.vhd
254 @echo "vcom gaisler done"
254 @echo "vcom gaisler done"
255
255
256 vcom_techmap:
256 vcom_techmap:
257 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/gencomp/gencomp.vhd
257 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/gencomp/gencomp.vhd
258 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/gencomp/netcomp.vhd
258 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/gencomp/netcomp.vhd
259 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/inferred/memory_inferred.vhd
259 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/inferred/memory_inferred.vhd
260 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/inferred/tap_inferred.vhd
260 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/inferred/tap_inferred.vhd
261 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/inferred/ddr_inferred.vhd
261 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/inferred/ddr_inferred.vhd
262 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/inferred/mul_inferred.vhd
262 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/inferred/mul_inferred.vhd
263 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/inferred/ddr_phy_inferred.vhd
263 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/inferred/ddr_phy_inferred.vhd
264 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/inferred/ddrphy_datapath.vhd
264 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/inferred/ddrphy_datapath.vhd
265 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/inferred/sim_pll.vhd
265 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/inferred/sim_pll.vhd
266 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/proasic3e/buffer_apa3e.vhd
266 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/proasic3e/buffer_apa3e.vhd
267 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/proasic3e/clkgen_proasic3e.vhd
267 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/proasic3e/clkgen_proasic3e.vhd
268 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/proasic3e/ddr_proasic3e.vhd
268 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/proasic3e/ddr_proasic3e.vhd
269 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/proasic3e/memory_apa3e.vhd
269 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/proasic3e/memory_apa3e.vhd
270 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/proasic3e/pads_apa3e.vhd
270 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/proasic3e/pads_apa3e.vhd
271 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/proasic3e/tap_proasic3e.vhd
271 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/proasic3e/tap_proasic3e.vhd
272 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/allclkgen.vhd
272 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/allclkgen.vhd
273 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/allddr.vhd
273 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/allddr.vhd
274 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/allmem.vhd
274 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/allmem.vhd
275 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/allmul.vhd
275 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/allmul.vhd
276 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/allpads.vhd
276 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/allpads.vhd
277 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/alltap.vhd
277 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/alltap.vhd
278 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/clkgen.vhd
278 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/clkgen.vhd
279 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/clkmux.vhd
279 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/clkmux.vhd
280 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/clkand.vhd
280 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/clkand.vhd
281 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/ddr_ireg.vhd
281 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/ddr_ireg.vhd
282 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/ddr_oreg.vhd
282 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/ddr_oreg.vhd
283 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/ddrphy.vhd
283 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/ddrphy.vhd
284 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram.vhd
284 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram.vhd
285 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram64.vhd
285 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram64.vhd
286 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram_2p.vhd
286 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram_2p.vhd
287 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram_dp.vhd
287 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram_dp.vhd
288 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncfifo.vhd
288 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncfifo.vhd
289 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/regfile_3p.vhd
289 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/regfile_3p.vhd
290 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/tap.vhd
290 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/tap.vhd
291 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/techbuf.vhd
291 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/techbuf.vhd
292 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/nandtree.vhd
292 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/nandtree.vhd
293 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/clkpad.vhd
293 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/clkpad.vhd
294 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/clkpad_ds.vhd
294 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/clkpad_ds.vhd
295 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/inpad.vhd
295 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/inpad.vhd
296 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/inpad_ds.vhd
296 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/inpad_ds.vhd
297 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/iodpad.vhd
297 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/iodpad.vhd
298 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/iopad.vhd
298 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/iopad.vhd
299 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/iopad_ds.vhd
299 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/iopad_ds.vhd
300 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/lvds_combo.vhd
300 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/lvds_combo.vhd
301 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/odpad.vhd
301 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/odpad.vhd
302 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/outpad.vhd
302 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/outpad.vhd
303 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/outpad_ds.vhd
303 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/outpad_ds.vhd
304 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/toutpad.vhd
304 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/toutpad.vhd
305 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/skew_outpad.vhd
305 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/skew_outpad.vhd
306 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grspwc_net.vhd
306 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grspwc_net.vhd
307 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grspwc2_net.vhd
307 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grspwc2_net.vhd
308 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grlfpw_net.vhd
308 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grlfpw_net.vhd
309 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grlfpw4_net.vhd
309 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grlfpw4_net.vhd
310 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grfpw_net.vhd
310 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grfpw_net.vhd
311 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grfpw4_net.vhd
311 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grfpw4_net.vhd
312 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/leon4_net.vhd
312 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/leon4_net.vhd
313 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/mul_61x61.vhd
313 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/mul_61x61.vhd
314 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/cpu_disas_net.vhd
314 $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/cpu_disas_net.vhd
315 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/ringosc.vhd
315 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/ringosc.vhd
316 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/corepcif_net.vhd
316 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/corepcif_net.vhd
317 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/pci_arb_net.vhd
317 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/pci_arb_net.vhd
318 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grpci2_phy_net.vhd
318 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grpci2_phy_net.vhd
319 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/system_monitor.vhd
319 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/system_monitor.vhd
320 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grgates.vhd
320 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/grgates.vhd
321 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/inpad_ddr.vhd
321 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/inpad_ddr.vhd
322 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/outpad_ddr.vhd
322 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/outpad_ddr.vhd
323 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/iopad_ddr.vhd
323 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/iopad_ddr.vhd
324 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram128bw.vhd
324 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram128bw.vhd
325 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram256bw.vhd
325 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram256bw.vhd
326 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram128.vhd
326 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram128.vhd
327 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram156bw.vhd
327 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram156bw.vhd
328 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/techmult.vhd
328 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/techmult.vhd
329 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/spictrl_net.vhd
329 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/spictrl_net.vhd
330 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/scanreg.vhd
330 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/scanreg.vhd
331 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncrambw.vhd
331 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncrambw.vhd
332 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram_2pbw.vhd
332 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/syncram_2pbw.vhd
333 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/obt1553_net.vhd
333 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/obt1553_net.vhd
334 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/sdram_phy.vhd
334 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/sdram_phy.vhd
335 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/from.vhd
335 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/from.vhd
336 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/mtie_maps.vhd
336 # $(CMD_VCOM) techmap $(GRLIB)/lib/techmap/maps/mtie_maps.vhd
337 @echo "vcom techmap done"
337 @echo "vcom techmap done"
338
338
339 vcom_lpp:
339 vcom_lpp:
340 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/./lpp_amba/lpp_amba.vhd
340 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/./lpp_amba/lpp_amba.vhd
341 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/./dsp/iir_filter/iir_filter.vhd
341 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/./dsp/iir_filter/iir_filter.vhd
342 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/./dsp/iir_filter/RAM_CEL.vhd
342 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/./dsp/iir_filter/RAM_CEL.vhd
343 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/./dsp/lpp_fft/fft_components.vhd
343 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/./dsp/lpp_fft/fft_components.vhd
344 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/./dsp/lpp_fft/lpp_fft.vhd
344 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/./dsp/lpp_fft/lpp_fft.vhd
345 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/./dsp/lpp_fft/Linker_FFT.vhd
345 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/./dsp/lpp_fft/Linker_FFT.vhd
346 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/general_purpose.vhd
346 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/general_purpose.vhd
347 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/ADDRcntr.vhd
347 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/ADDRcntr.vhd
348 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/ALU.vhd
348 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/ALU.vhd
349 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Adder.vhd
349 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Adder.vhd
350 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Clk_Divider2.vhd
350 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Clk_Divider2.vhd
351 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Clk_divider.vhd
351 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Clk_divider.vhd
352 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC.vhd
352 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC.vhd
353 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_CONTROLER.vhd
353 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_CONTROLER.vhd
354 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_MUX.vhd
354 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_MUX.vhd
355 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_MUX2.vhd
355 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_MUX2.vhd
356 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_REG.vhd
356 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_REG.vhd
357 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MUX2.vhd
357 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MUX2.vhd
358 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MUXN.vhd
358 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MUXN.vhd
359 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Multiplier.vhd
359 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Multiplier.vhd
360 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/REG.vhd
360 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/REG.vhd
361 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/SYNC_FF.vhd
361 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/SYNC_FF.vhd
362 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Shifter.vhd
362 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Shifter.vhd
363 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/TwoComplementer.vhd
363 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/TwoComplementer.vhd
364 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Clock_Divider.vhd
364 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Clock_Divider.vhd
365 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/lpp_front_to_level.vhd
365 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/lpp_front_to_level.vhd
366 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/lpp_front_detection.vhd
366 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/lpp_front_detection.vhd
367 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/lpp_front_positive_detection.vhd
367 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/lpp_front_positive_detection.vhd
368 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/SYNC_VALID_BIT.vhd
368 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/SYNC_VALID_BIT.vhd
369 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/RR_Arbiter_4.vhd
369 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/RR_Arbiter_4.vhd
370 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/general_counter.vhd
370 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/general_counter.vhd
371 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_ad_Conv/lpp_ad_Conv.vhd
371 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_ad_Conv/lpp_ad_Conv.vhd
372 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/dsp/iir_filter/FILTERcfg.vhd
372 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/dsp/iir_filter/FILTERcfg.vhd
373 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_amba/apb_devices_list.vhd
373 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_amba/apb_devices_list.vhd
374 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_dma/lpp_dma_pkg.vhd
374 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_dma/lpp_dma_pkg.vhd
375 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/lpp_matrix.vhd
375 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/lpp_matrix.vhd
376 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/MatriceSpectrale.vhd
376 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/MatriceSpectrale.vhd
377 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/ALU_Driver.vhd
377 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/ALU_Driver.vhd
378 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/ReUse_CTRLR.vhd
378 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/ReUse_CTRLR.vhd
379 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/Dispatch.vhd
379 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/Dispatch.vhd
380 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/DriveInputs.vhd
380 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/DriveInputs.vhd
381 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/GetResult.vhd
381 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/GetResult.vhd
382 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/MatriceSpectrale.vhd
382 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/MatriceSpectrale.vhd
383 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/Matrix.vhd
383 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/Matrix.vhd
384 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/TopSpecMatrix.vhd
384 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/TopSpecMatrix.vhd
385 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/SpectralMatrix.vhd
385 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_matrix/SpectralMatrix.vhd
386 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_Header/lpp_Header.vhd
386 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_Header/lpp_Header.vhd
387 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_Header/HeaderBuilder.vhd
387 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_Header/HeaderBuilder.vhd
388 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_memory/lpp_memory.vhd
388 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_memory/lpp_memory.vhd
389 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_memory/lppFIFOxN.vhd
389 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_memory/lppFIFOxN.vhd
390 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_memory/lpp_FIFO.vhd
390 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_memory/lpp_FIFO.vhd
391 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/./dsp/lpp_fft/CoreFFT_simu.vhd
391 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/./dsp/lpp_fft/CoreFFT_simu.vhd
392 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_spectral_matrix/spectral_matrix_package.vhd
392 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_spectral_matrix/spectral_matrix_package.vhd
393 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_spectral_matrix/spectral_matrix_switch_f0.vhd
393 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_spectral_matrix/spectral_matrix_switch_f0.vhd
394 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_spectral_matrix/spectral_matrix_time_managment.vhd
394 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_spectral_matrix/spectral_matrix_time_managment.vhd
395 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_spectral_matrix/MS_control.vhd
395 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_spectral_matrix/MS_control.vhd
396 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_spectral_matrix/MS_calculation.vhd
396 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_spectral_matrix/MS_calculation.vhd
397 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_top_lfr/lpp_lfr_pkg.vhd
397 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_amba/apb_devices_list.vhd
398 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_top_lfr/lpp_lfr_pkg.vhd
399 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_top_lfr/lpp_lfr_apbreg_simu.vhd
400 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_top_lfr/lpp_lfr_apbreg_ms_pointer.vhd
398 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_top_lfr/lpp_lfr_ms.vhd
401 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_top_lfr/lpp_lfr_ms.vhd
399 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_top_lfr/lpp_lfr_ms_fsmdma.vhd
402 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_top_lfr/lpp_lfr_ms_fsmdma.vhd
400 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_top_lfr/lpp_lfr_ms_FFT.vhd
403 $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_top_lfr/lpp_lfr_ms_FFT.vhd
401 @echo "vcom lpp done"
404 @echo "vcom lpp done"
402
405
403 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_amba/apb_devices_list.vhd
406 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lpp_amba/apb_devices_list.vhd
404 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/general_purpose.vhd
407 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/general_purpose.vhd
405 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/ADDRcntr.vhd
408 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/ADDRcntr.vhd
406 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/ALU.vhd
409 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/ALU.vhd
407 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Adder.vhd
410 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Adder.vhd
408 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Clk_Divider2.vhd
411 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Clk_Divider2.vhd
409 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Clk_divider.vhd
412 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Clk_divider.vhd
410 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC.vhd
413 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC.vhd
411 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_CONTROLER.vhd
414 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_CONTROLER.vhd
412 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_MUX.vhd
415 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_MUX.vhd
413 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_MUX2.vhd
416 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_MUX2.vhd
414 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_REG.vhd
417 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MAC_REG.vhd
415 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MUX2.vhd
418 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MUX2.vhd
416 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MUXN.vhd
419 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/MUXN.vhd
417 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Multiplier.vhd
420 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Multiplier.vhd
418 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/REG.vhd
421 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/REG.vhd
419 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/SYNC_FF.vhd
422 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/SYNC_FF.vhd
420 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Shifter.vhd
423 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Shifter.vhd
421 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/TwoComplementer.vhd
424 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/TwoComplementer.vhd
422 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Clock_Divider.vhd
425 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/Clock_Divider.vhd
423 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/lpp_front_to_level.vhd
426 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/lpp_front_to_level.vhd
424 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/lpp_front_detection.vhd
427 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/lpp_front_detection.vhd
425 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/lpp_front_positive_detection.vhd
428 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/lpp_front_positive_detection.vhd
426 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/SYNC_VALID_BIT.vhd
429 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/SYNC_VALID_BIT.vhd
427 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/RR_Arbiter_4.vhd
430 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/RR_Arbiter_4.vhd
428 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/general_counter.vhd
431 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/general_purpose/general_counter.vhd
429 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lfr_time_management/lpp_lfr_time_management.vhd
432 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lfr_time_management/lpp_lfr_time_management.vhd
430 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lfr_time_management/apb_lfr_time_management.vhd
433 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lfr_time_management/apb_lfr_time_management.vhd
431 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lfr_time_management/lfr_time_management.vhd
434 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lfr_time_management/lfr_time_management.vhd
432 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lfr_time_management/fine_time_counter.vhd
435 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lfr_time_management/fine_time_counter.vhd
433 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lfr_time_management/coarse_time_counter.vhd
436 # $(CMD_VCOM) lpp $(VHDLIB)/lib/lpp/lfr_time_management/coarse_time_counter.vhd
434 # @echo "vcom lpp done"
437 # @echo "vcom lpp done"
435
438
436 #include Makefile_vcom_lpp
439 #include Makefile_vcom_lpp
@@ -1,321 +1,422
1 ------------------------------------------------------------------------------
1 ------------------------------------------------------------------------------
2 -- This file is a part of the LPP VHDL IP LIBRARY
2 -- This file is a part of the LPP VHDL IP LIBRARY
3 -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS
3 -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS
4 --
4 --
5 -- This program is free software; you can redistribute it and/or modify
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 3 of the License, or
7 -- the Free Software Foundation; either version 3 of the License, or
8 -- (at your option) any later version.
8 -- (at your option) any later version.
9 --
9 --
10 -- This program is distributed in the hope that it will be useful,
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
13 -- GNU General Public License for more details.
14 --
14 --
15 -- You should have received a copy of the GNU General Public License
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------
18 -------------------------------------------------------------------------------
19 -- Author : Jean-christophe Pellion
19 -- Author : Jean-christophe Pellion
20 -- Mail : jean-christophe.pellion@lpp.polytechnique.fr
20 -- Mail : jean-christophe.pellion@lpp.polytechnique.fr
21 -------------------------------------------------------------------------------
21 -------------------------------------------------------------------------------
22
22
23 LIBRARY IEEE;
23 LIBRARY IEEE;
24 USE IEEE.STD_LOGIC_1164.ALL;
24 USE IEEE.STD_LOGIC_1164.ALL;
25 USE IEEE.NUMERIC_STD.ALL;
25 USE IEEE.NUMERIC_STD.ALL;
26
26
27 LIBRARY lpp;
27 LIBRARY lpp;
28 USE lpp.lpp_lfr_pkg.ALL;
28 USE lpp.lpp_lfr_pkg.ALL;
29 USE lpp.lpp_memory.ALL;
29 USE lpp.lpp_memory.ALL;
30 USE lpp.iir_filter.ALL;
30 USE lpp.iir_filter.ALL;
31 USE lpp.spectral_matrix_package.ALL;
31 USE lpp.spectral_matrix_package.ALL;
32 use lpp.lpp_fft.all;
32 use lpp.lpp_fft.all;
33 use lpp.fft_components.all;
33 use lpp.fft_components.all;
34
34
35 LIBRARY grlib;
36 USE grlib.amba.ALL;
37 USE grlib.stdlib.ALL;
38 USE grlib.devices.ALL;
39 USE GRLIB.DMA2AHB_Package.ALL;
40
35 ENTITY TB IS
41 ENTITY TB IS
36
42
37
43
38 END TB;
44 END TB;
39
45
40
46
41 ARCHITECTURE beh OF TB IS
47 ARCHITECTURE beh OF TB IS
42
48
43 -----------------------------------------------------------------------------
49 -----------------------------------------------------------------------------
44 SIGNAL clk25MHz : STD_LOGIC := '0';
50 SIGNAL clk25MHz : STD_LOGIC := '0';
45 SIGNAL rstn : STD_LOGIC := '0';
51 SIGNAL rstn : STD_LOGIC := '0';
46
52
47 -----------------------------------------------------------------------------
53 -----------------------------------------------------------------------------
48 SIGNAL coarse_time : STD_LOGIC_VECTOR(31 DOWNTO 0);
54 SIGNAL coarse_time : STD_LOGIC_VECTOR(31 DOWNTO 0);
49 SIGNAL fine_time : STD_LOGIC_VECTOR(15 DOWNTO 0);
55 SIGNAL fine_time : STD_LOGIC_VECTOR(15 DOWNTO 0);
50 SIGNAL sample_f0_wen : STD_LOGIC_VECTOR(4 DOWNTO 0);
56 SIGNAL sample_f0_wen : STD_LOGIC_VECTOR(4 DOWNTO 0);
51 SIGNAL sample_f0_wdata : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
57 SIGNAL sample_f0_wdata : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
52 SIGNAL sample_f1_wen : STD_LOGIC_VECTOR(4 DOWNTO 0);
58 SIGNAL sample_f1_wen : STD_LOGIC_VECTOR(4 DOWNTO 0);
53 SIGNAL sample_f1_wdata : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
59 SIGNAL sample_f1_wdata : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
54 SIGNAL sample_f2_wen : STD_LOGIC_VECTOR(4 DOWNTO 0);
60 SIGNAL sample_f2_wen : STD_LOGIC_VECTOR(4 DOWNTO 0);
55 SIGNAL sample_f2_wdata : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
61 SIGNAL sample_f2_wdata : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
56 SIGNAL dma_addr : STD_LOGIC_VECTOR(31 DOWNTO 0);
62 SIGNAL dma_addr : STD_LOGIC_VECTOR(31 DOWNTO 0);
57 SIGNAL dma_data : STD_LOGIC_VECTOR(31 DOWNTO 0);
63 SIGNAL dma_data : STD_LOGIC_VECTOR(31 DOWNTO 0);
58 SIGNAL dma_valid : STD_LOGIC;
64 SIGNAL dma_valid : STD_LOGIC;
59 SIGNAL dma_valid_burst : STD_LOGIC;
65 SIGNAL dma_valid_burst : STD_LOGIC;
60 SIGNAL dma_ren : STD_LOGIC;
66 SIGNAL dma_ren : STD_LOGIC;
61 SIGNAL dma_done : STD_LOGIC;
67 SIGNAL dma_done : STD_LOGIC;
62 SIGNAL ready_matrix_f0 : STD_LOGIC;
68 SIGNAL ready_matrix_f0 : STD_LOGIC;
63 -- SIGNAL ready_matrix_f0_1 : STD_LOGIC;
69 -- SIGNAL ready_matrix_f0_1 : STD_LOGIC;
64 SIGNAL ready_matrix_f1 : STD_LOGIC;
70 SIGNAL ready_matrix_f1 : STD_LOGIC;
65 SIGNAL ready_matrix_f2 : STD_LOGIC;
71 SIGNAL ready_matrix_f2 : STD_LOGIC;
66 -- SIGNAL error_anticipating_empty_fifo : STD_LOGIC;
72 -- SIGNAL error_anticipating_empty_fifo : STD_LOGIC;
67 SIGNAL error_bad_component_error : STD_LOGIC;
73 SIGNAL error_bad_component_error : STD_LOGIC;
68 SIGNAL debug_reg : STD_LOGIC_VECTOR(31 DOWNTO 0);
74 SIGNAL debug_reg : STD_LOGIC_VECTOR(31 DOWNTO 0);
69 SIGNAL status_ready_matrix_f0 : STD_LOGIC;
75 SIGNAL status_ready_matrix_f0 : STD_LOGIC;
70 -- SIGNAL status_ready_matrix_f0_1 : STD_LOGIC;
76 -- SIGNAL status_ready_matrix_f0_1 : STD_LOGIC;
71 SIGNAL status_ready_matrix_f1 : STD_LOGIC;
77 SIGNAL status_ready_matrix_f1 : STD_LOGIC;
72 SIGNAL status_ready_matrix_f2 : STD_LOGIC;
78 SIGNAL status_ready_matrix_f2 : STD_LOGIC;
73 -- SIGNAL status_error_anticipating_empty_fifo : STD_LOGIC;
79 -- SIGNAL status_error_anticipating_empty_fifo : STD_LOGIC;
74 -- SIGNAL status_error_bad_component_error : STD_LOGIC;
80 -- SIGNAL status_error_bad_component_error : STD_LOGIC;
75 SIGNAL config_active_interruption_onNewMatrix : STD_LOGIC;
81 SIGNAL config_active_interruption_onNewMatrix : STD_LOGIC;
76 SIGNAL config_active_interruption_onError : STD_LOGIC;
82 SIGNAL config_active_interruption_onError : STD_LOGIC;
77 SIGNAL addr_matrix_f0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
83 SIGNAL addr_matrix_f0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
78 -- SIGNAL addr_matrix_f0_1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
84 -- SIGNAL addr_matrix_f0_1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
79 SIGNAL addr_matrix_f1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
85 SIGNAL addr_matrix_f1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
80 SIGNAL addr_matrix_f2 : STD_LOGIC_VECTOR(31 DOWNTO 0);
86 SIGNAL addr_matrix_f2 : STD_LOGIC_VECTOR(31 DOWNTO 0);
81 SIGNAL matrix_time_f0 : STD_LOGIC_VECTOR(47 DOWNTO 0);
87 SIGNAL matrix_time_f0 : STD_LOGIC_VECTOR(47 DOWNTO 0);
82 -- SIGNAL matrix_time_f0_1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
88 -- SIGNAL matrix_time_f0_1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
83 SIGNAL matrix_time_f1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
89 SIGNAL matrix_time_f1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
84 SIGNAL matrix_time_f2 : STD_LOGIC_VECTOR(47 DOWNTO 0);
90 SIGNAL matrix_time_f2 : STD_LOGIC_VECTOR(47 DOWNTO 0);
85
91
86 -----------------------------------------------------------------------------
92 -----------------------------------------------------------------------------
87 SIGNAL clk49_152MHz : STD_LOGIC := '0';
93 SIGNAL clk49_152MHz : STD_LOGIC := '0';
88 SIGNAL sample_counter_24k : INTEGER;
94 SIGNAL sample_counter_24k : INTEGER;
89 SIGNAL s_24576Hz : STD_LOGIC;
95 SIGNAL s_24576Hz : STD_LOGIC;
90
96
91 SIGNAL s_24_sync_reg_0 : STD_LOGIC;
97 SIGNAL s_24_sync_reg_0 : STD_LOGIC;
92 SIGNAL s_24_sync_reg_1 : STD_LOGIC;
98 SIGNAL s_24_sync_reg_1 : STD_LOGIC;
93
99
94 SIGNAL s_24576Hz_sync : STD_LOGIC;
100 SIGNAL s_24576Hz_sync : STD_LOGIC;
95
101
96 SIGNAL sample_counter_f1 : INTEGER;
102 SIGNAL sample_counter_f1 : INTEGER;
97 SIGNAL sample_counter_f2 : INTEGER;
103 SIGNAL sample_counter_f2 : INTEGER;
98 --
104 --
99 SIGNAL sample_f0_val : STD_LOGIC;
105 SIGNAL sample_f0_val : STD_LOGIC;
100 SIGNAL sample_f1_val : STD_LOGIC;
106 SIGNAL sample_f1_val : STD_LOGIC;
101 SIGNAL sample_f2_val : STD_LOGIC;
107 SIGNAL sample_f2_val : STD_LOGIC;
102
108
103 -----------------------------------------------------------------------------
109 -----------------------------------------------------------------------------
104 SIGNAL ren_counter : INTEGER;
110 SIGNAL ren_counter : INTEGER;
105
111
112 SIGNAL error_buffer_full : STD_LOGIC;
113 SIGNAL error_input_fifo_write : STD_LOGIC_VECTOR(2 DOWNTO 0);
114 -----------------------------------------------------------------------------
115 SIGNAL apbi : apb_slv_in_type;
116 SIGNAL status_full : STD_LOGIC_VECTOR(3 DOWNTO 0);
117 SIGNAL status_full_ack : STD_LOGIC_VECTOR(3 DOWNTO 0);
118 SIGNAL status_full_err : STD_LOGIC_VECTOR(3 DOWNTO 0);
119 SIGNAL status_new_err : STD_LOGIC_VECTOR(3 DOWNTO 0);
120
106 BEGIN -- beh
121 BEGIN -- beh
107
122
108 clk25MHz <= NOT clk25MHz AFTER 20 ns;
123 clk25MHz <= NOT clk25MHz AFTER 20 ns;
109 clk25MHz <= NOT clk25MHz AFTER 20 ns;
124 clk25MHz <= NOT clk25MHz AFTER 20 ns;
110 clk49_152MHz <= NOT clk49_152MHz AFTER 10173 ps; -- 49.152/2 MHz
125 clk49_152MHz <= NOT clk49_152MHz AFTER 10173 ps; -- 49.152/2 MHz
111
126
112 PROCESS
127 PROCESS
113 BEGIN -- PROCESS
128 BEGIN -- PROCESS
114 WAIT UNTIL clk25MHz = '1';
129 WAIT UNTIL clk25MHz = '1';
115 WAIT UNTIL clk25MHz = '1';
130 WAIT UNTIL clk25MHz = '1';
116 WAIT UNTIL clk25MHz = '1';
131 WAIT UNTIL clk25MHz = '1';
117 rstn <= '1';
132 rstn <= '1';
118 WAIT UNTIL clk25MHz = '1';
133 WAIT UNTIL clk25MHz = '1';
119
134
120
135
121 WAIT FOR 100 ms;
136 WAIT FOR 100 ms;
122
137
123 REPORT "*** END simulation ***" SEVERITY failure;
138 REPORT "*** END simulation ***" SEVERITY failure;
124 WAIT;
139 WAIT;
125
140
126 END PROCESS;
141 END PROCESS;
127
142
128
143
129 -----------------------------------------------------------------------------
144 -----------------------------------------------------------------------------
130 PROCESS (clk49_152MHz, rstn)
145 PROCESS (clk49_152MHz, rstn)
131 BEGIN -- PROCESS
146 BEGIN -- PROCESS
132 IF rstn = '0' THEN -- asynchronous reset (active low)
147 IF rstn = '0' THEN -- asynchronous reset (active low)
133 sample_counter_24k <= 0;
148 sample_counter_24k <= 0;
134 s_24576Hz <= '0';
149 s_24576Hz <= '0';
135 ELSIF clk49_152MHz'event AND clk49_152MHz = '1' THEN -- rising clock edge
150 ELSIF clk49_152MHz'event AND clk49_152MHz = '1' THEN -- rising clock edge
136 IF sample_counter_24k = 0 THEN
151 IF sample_counter_24k = 0 THEN
137 sample_counter_24k <= 2000;
152 sample_counter_24k <= 2000;
138 s_24576Hz <= NOT s_24576Hz;
153 s_24576Hz <= NOT s_24576Hz;
139 ELSE
154 ELSE
140 sample_counter_24k <= sample_counter_24k - 1;
155 sample_counter_24k <= sample_counter_24k - 1;
141 END IF;
156 END IF;
142 END IF;
157 END IF;
143 END PROCESS;
158 END PROCESS;
144
159
145 PROCESS (clk25MHz, rstn)
160 PROCESS (clk25MHz, rstn)
146 BEGIN -- PROCESS
161 BEGIN -- PROCESS
147 IF rstn = '0' THEN -- asynchronous reset (active low)
162 IF rstn = '0' THEN -- asynchronous reset (active low)
148 s_24_sync_reg_0 <= '0';
163 s_24_sync_reg_0 <= '0';
149 s_24_sync_reg_1 <= '0';
164 s_24_sync_reg_1 <= '0';
150 s_24576Hz_sync <= '0';
165 s_24576Hz_sync <= '0';
151 ELSIF clk25MHz'event AND clk25MHz = '1' THEN -- rising clock edge
166 ELSIF clk25MHz'event AND clk25MHz = '1' THEN -- rising clock edge
152 s_24_sync_reg_0 <= s_24576Hz;
167 s_24_sync_reg_0 <= s_24576Hz;
153 s_24_sync_reg_1 <= s_24_sync_reg_0;
168 s_24_sync_reg_1 <= s_24_sync_reg_0;
154 s_24576Hz_sync <= s_24_sync_reg_0 XOR s_24_sync_reg_1;
169 s_24576Hz_sync <= s_24_sync_reg_0 XOR s_24_sync_reg_1;
155 END IF;
170 END IF;
156 END PROCESS;
171 END PROCESS;
157
172
158 PROCESS (clk25MHz, rstn)
173 PROCESS (clk25MHz, rstn)
159 BEGIN -- PROCESS
174 BEGIN -- PROCESS
160 IF rstn = '0' THEN -- asynchronous reset (active low)
175 IF rstn = '0' THEN -- asynchronous reset (active low)
161 sample_f0_val <= '0';
176 sample_f0_val <= '0';
162 sample_f1_val <= '0';
177 sample_f1_val <= '0';
163 sample_f2_val <= '0';
178 sample_f2_val <= '0';
164
179
165 sample_counter_f1 <= 0;
180 sample_counter_f1 <= 0;
166 sample_counter_f2 <= 0;
181 sample_counter_f2 <= 0;
167 ELSIF clk25MHz'event AND clk25MHz = '1' THEN -- rising clock edge
182 ELSIF clk25MHz'event AND clk25MHz = '1' THEN -- rising clock edge
168 IF s_24576Hz_sync = '1' THEN
183 IF s_24576Hz_sync = '1' THEN
169 sample_f0_val <= '1';
184 sample_f0_val <= '1';
170 IF sample_counter_f1 = 0 THEN
185 IF sample_counter_f1 = 0 THEN
171 sample_f1_val <= '1';
186 sample_f1_val <= '1';
172 sample_counter_f1 <= 5;
187 sample_counter_f1 <= 5;
173 ELSE
188 ELSE
174 sample_f1_val <= '0';
189 sample_f1_val <= '0';
175 sample_counter_f1 <= sample_counter_f1 -1;
190 sample_counter_f1 <= sample_counter_f1 -1;
176 END IF;
191 END IF;
177 IF sample_counter_f2 = 0 THEN
192 IF sample_counter_f2 = 0 THEN
178 sample_f2_val <= '1';
193 sample_f2_val <= '1';
179 sample_counter_f2 <= 95;
194 sample_counter_f2 <= 95;
180 ELSE
195 ELSE
181 sample_f2_val <= '0';
196 sample_f2_val <= '0';
182 sample_counter_f2 <= sample_counter_f2 -1;
197 sample_counter_f2 <= sample_counter_f2 -1;
183 END IF;
198 END IF;
184 ELSE
199 ELSE
185 sample_f0_val <= '0';
200 sample_f0_val <= '0';
186 sample_f1_val <= '0';
201 sample_f1_val <= '0';
187 sample_f2_val <= '0';
202 sample_f2_val <= '0';
188 END IF;
203 END IF;
189 END IF;
204 END IF;
190 END PROCESS;
205 END PROCESS;
191
206
192
207
193
208
194 -----------------------------------------------------------------------------
209 -----------------------------------------------------------------------------
195 coarse_time <= (OTHERS => '0');
210 coarse_time <= (OTHERS => '0');
196 fine_time <= (OTHERS => '0');
211 fine_time <= (OTHERS => '0');
197
212
198 sample_f0_wdata <= X"A000" & X"A111" & X"A222" & X"A333" & X"A444";
213 sample_f0_wdata <= X"A000" & X"A111" & X"A222" & X"A333" & X"A444";
199 sample_f1_wdata <= X"B000" & X"B111" & X"B222" & X"B333" & X"B444";
214 sample_f1_wdata <= X"B000" & X"B111" & X"B222" & X"B333" & X"B444";
200 sample_f2_wdata <= X"C000" & X"C111" & X"C222" & X"C333" & X"C444";
215 sample_f2_wdata <= X"C000" & X"C111" & X"C222" & X"C333" & X"C444";
201
216
202 sample_f0_wen <= NOT(sample_f0_val) & NOT(sample_f0_val) & NOT(sample_f0_val) & NOT(sample_f0_val) & NOT(sample_f0_val);
217 sample_f0_wen <= NOT(sample_f0_val) & NOT(sample_f0_val) & NOT(sample_f0_val) & NOT(sample_f0_val) & NOT(sample_f0_val);
203 sample_f1_wen <= NOT(sample_f1_val) & NOT(sample_f1_val) & NOT(sample_f1_val) & NOT(sample_f1_val) & NOT(sample_f1_val);
218 sample_f1_wen <= NOT(sample_f1_val) & NOT(sample_f1_val) & NOT(sample_f1_val) & NOT(sample_f1_val) & NOT(sample_f1_val);
204 sample_f2_wen <= NOT(sample_f2_val) & NOT(sample_f2_val) & NOT(sample_f2_val) & NOT(sample_f2_val) & NOT(sample_f2_val);
219 sample_f2_wen <= NOT(sample_f2_val) & NOT(sample_f2_val) & NOT(sample_f2_val) & NOT(sample_f2_val) & NOT(sample_f2_val);
205 -----------------------------------------------------------------------------
220 -----------------------------------------------------------------------------
206
221
207 lpp_lfr_ms_1: lpp_lfr_ms
222 lpp_lfr_ms_1: lpp_lfr_ms
208 GENERIC MAP (
223 GENERIC MAP (
209 Mem_use => use_CEL)
224 Mem_use => use_CEL)
210 PORT MAP (
225 PORT MAP (
211 clk => clk25MHz,
226 clk => clk25MHz,
212 rstn => rstn,
227 rstn => rstn,
213 --
228 --
214 coarse_time => coarse_time,
229 coarse_time => coarse_time,
215 fine_time => fine_time,
230 fine_time => fine_time,
216 --
231 --
217 sample_f0_wen => sample_f0_wen,
232 sample_f0_wen => sample_f0_wen,
218 sample_f0_wdata => sample_f0_wdata,
233 sample_f0_wdata => sample_f0_wdata,
219 sample_f1_wen => sample_f1_wen,
234 sample_f1_wen => sample_f1_wen,
220 sample_f1_wdata => sample_f1_wdata,
235 sample_f1_wdata => sample_f1_wdata,
221 sample_f2_wen => sample_f2_wen,
236 sample_f2_wen => sample_f2_wen,
222 sample_f2_wdata => sample_f2_wdata,
237 sample_f2_wdata => sample_f2_wdata,
223 --
238 --
224 dma_addr => dma_addr,
239 dma_addr => dma_addr,
225 dma_data => dma_data,
240 dma_data => dma_data,
226 dma_valid => dma_valid,
241 dma_valid => dma_valid,
227 dma_valid_burst => dma_valid_burst,
242 dma_valid_burst => dma_valid_burst,
228 dma_ren => dma_ren,
243 dma_ren => dma_ren,
229 dma_done => dma_done,
244 dma_done => dma_done,
230
245
231 ready_matrix_f0 => ready_matrix_f0,
246 ready_matrix_f0 => ready_matrix_f0,
232 -- ready_matrix_f0_1 => ready_matrix_f0_1,
247 -- ready_matrix_f0_1 => ready_matrix_f0_1,
233 ready_matrix_f1 => ready_matrix_f1,
248 ready_matrix_f1 => ready_matrix_f1,
234 ready_matrix_f2 => ready_matrix_f2,
249 ready_matrix_f2 => ready_matrix_f2,
235 -- error_anticipating_empty_fifo => error_anticipating_empty_fifo,
250 -- error_anticipating_empty_fifo => error_anticipating_empty_fifo,
236 error_bad_component_error => error_bad_component_error,
251 error_bad_component_error => error_bad_component_error,
237 error_buffer_full => OPEN,
252 error_buffer_full => error_buffer_full,
238 error_input_fifo_write => OPEN,
253 error_input_fifo_write => error_input_fifo_write,
239
254
240 debug_reg => debug_reg,
255 debug_reg => debug_reg,
241 status_ready_matrix_f0 => status_ready_matrix_f0,
256 status_ready_matrix_f0 => status_ready_matrix_f0,
242 -- status_ready_matrix_f0 => status_ready_matrix_f0_1,
257 -- status_ready_matrix_f0 => status_ready_matrix_f0_1,
243 status_ready_matrix_f1 => status_ready_matrix_f1,
258 status_ready_matrix_f1 => status_ready_matrix_f1,
244 status_ready_matrix_f2 => status_ready_matrix_f2,
259 status_ready_matrix_f2 => status_ready_matrix_f2,
245 -- status_error_anticipating_empty_fifo => status_error_anticipating_empty_fifo,
260 -- status_error_anticipating_empty_fifo => status_error_anticipating_empty_fifo,
246 -- status_error_bad_component_error => status_error_bad_component_error,
261 -- status_error_bad_component_error => status_error_bad_component_error,
247 config_active_interruption_onNewMatrix => config_active_interruption_onNewMatrix,
262 config_active_interruption_onNewMatrix => config_active_interruption_onNewMatrix,
248 config_active_interruption_onError => config_active_interruption_onError,
263 config_active_interruption_onError => config_active_interruption_onError,
249 addr_matrix_f0 => addr_matrix_f0,
264 addr_matrix_f0 => addr_matrix_f0,
250 -- addr_matrix_f0_1 => addr_matrix_f0_1,
265 -- addr_matrix_f0_1 => addr_matrix_f0_1,
251 addr_matrix_f1 => addr_matrix_f1,
266 addr_matrix_f1 => addr_matrix_f1,
252 addr_matrix_f2 => addr_matrix_f2,
267 addr_matrix_f2 => addr_matrix_f2,
253 matrix_time_f0 => matrix_time_f0,
268 matrix_time_f0 => matrix_time_f0,
254 -- matrix_time_f0_1 => matrix_time_f0_1,
269 -- matrix_time_f0_1 => matrix_time_f0_1,
255 matrix_time_f1 => matrix_time_f1,
270 matrix_time_f1 => matrix_time_f1,
256 matrix_time_f2 => matrix_time_f2);
271 matrix_time_f2 => matrix_time_f2);
257
272
273
274
275
276 lpp_lfr_apbreg_1 : lpp_lfr_apbreg
277 GENERIC MAP (
278 nb_data_by_buffer_size => 11,
279 nb_word_by_buffer_size => 11,
280 nb_snapshot_param_size => 11,
281 delta_vector_size => 20,
282 delta_vector_size_f0_2 => 7,
283 pindex => 4,
284 paddr => 4,
285 pmask => 16#fff#,
286 pirq_ms => 0,
287 pirq_wfp => 1,
288 top_lfr_version => (OTHERS => '0')
289 )
290 PORT MAP (
291 HCLK => clk25MHz,
292 HRESETn => rstn,
293 apbi => apbi,
294 apbo => OPEN,
295
296 run_ms => OPEN,
297
298 ready_matrix_f0 => ready_matrix_f0,
299 ready_matrix_f1 => ready_matrix_f1,
300 ready_matrix_f2 => ready_matrix_f2,
301 error_bad_component_error => error_bad_component_error,
302 error_buffer_full => error_buffer_full, -- TODO
303 error_input_fifo_write => error_input_fifo_write, -- TODO
304 status_ready_matrix_f0 => status_ready_matrix_f0,
305 status_ready_matrix_f1 => status_ready_matrix_f1,
306 status_ready_matrix_f2 => status_ready_matrix_f2,
307 config_active_interruption_onNewMatrix => config_active_interruption_onNewMatrix,
308 config_active_interruption_onError => config_active_interruption_onError,
309
310 matrix_time_f0 => matrix_time_f0,
311 matrix_time_f1 => matrix_time_f1,
312 matrix_time_f2 => matrix_time_f2,
313
314 addr_matrix_f0 => addr_matrix_f0,
315 addr_matrix_f1 => addr_matrix_f1,
316 addr_matrix_f2 => addr_matrix_f2,
317 -------------------------------------------------------------------------
318 status_full => status_full,
319 status_full_ack => status_full_ack,
320 status_full_err => status_full_err,
321 status_new_err => status_new_err,
322 data_shaping_BW => OPEN,
323 data_shaping_SP0 => OPEN,
324 data_shaping_SP1 => OPEN,
325 data_shaping_R0 => OPEN,
326 data_shaping_R1 => OPEN,
327 delta_snapshot => OPEN,
328 delta_f0 => OPEN,
329 delta_f0_2 => OPEN,
330 delta_f1 => OPEN,
331 delta_f2 => OPEN,
332 nb_data_by_buffer => OPEN,
333 nb_word_by_buffer => OPEN,
334 nb_snapshot_param => OPEN,
335 enable_f0 => OPEN,
336 enable_f1 => OPEN,
337 enable_f2 => OPEN,
338 enable_f3 => OPEN,
339 burst_f0 => OPEN,
340 burst_f1 => OPEN,
341 burst_f2 => OPEN,
342 run => OPEN,
343 addr_data_f0 => OPEN,
344 addr_data_f1 => OPEN,
345 addr_data_f2 => OPEN,
346 addr_data_f3 => OPEN,
347 start_date => OPEN);
348
349
350
351
352
353
354
355
356
357
258
358
259
359
260
360
261
361
262 PROCESS (clk25MHz, rstn)
362
263 BEGIN -- PROCESS
363
264 IF rstn = '0' THEN -- asynchronous reset (active low)
364 -- PROCESS (clk25MHz, rstn)
265 status_ready_matrix_f0 <= '0';
365 -- BEGIN -- PROCESS
266 -- status_ready_matrix_f0_1 <= '0';
366 -- IF rstn = '0' THEN -- asynchronous reset (active low)
267 status_ready_matrix_f1 <= '0';
367 -- status_ready_matrix_f0 <= '0';
268 status_ready_matrix_f2 <= '0';
368 ---- status_ready_matrix_f0_1 <= '0';
269 ELSIF clk25MHz'event AND clk25MHz = '1' THEN -- rising clock edge
369 -- status_ready_matrix_f1 <= '0';
270 status_ready_matrix_f0 <= status_ready_matrix_f0 OR ready_matrix_f0;
370 -- status_ready_matrix_f2 <= '0';
271 -- status_ready_matrix_f0_1 <= status_ready_matrix_f0_1 OR ready_matrix_f0_1;
371 -- ELSIF clk25MHz'event AND clk25MHz = '1' THEN -- rising clock edge
272 status_ready_matrix_f1 <= status_ready_matrix_f1 OR ready_matrix_f1;
372 -- status_ready_matrix_f0 <= status_ready_matrix_f0 OR ready_matrix_f0;
273 status_ready_matrix_f2 <= status_ready_matrix_f2 OR ready_matrix_f2;
373 ---- status_ready_matrix_f0_1 <= status_ready_matrix_f0_1 OR ready_matrix_f0_1;
274 END IF;
374 -- status_ready_matrix_f1 <= status_ready_matrix_f1 OR ready_matrix_f1;
275 END PROCESS;
375 -- status_ready_matrix_f2 <= status_ready_matrix_f2 OR ready_matrix_f2;
276
376 -- END IF;
377 -- END PROCESS;
277
378
278
379
279
380
280 -- status_error_anticipating_empty_fifo <= '0';
381 -- status_error_anticipating_empty_fifo <= '0';
281 -- status_error_bad_component_error <= '0';
382 -- status_error_bad_component_error <= '0';
282
383
283 config_active_interruption_onNewMatrix <= '0';
384 -- config_active_interruption_onNewMatrix <= '0';
284 config_active_interruption_onError <= '0';
385 -- config_active_interruption_onError <= '0';
285 addr_matrix_f0 <= (OTHERS => '0');
386 -- addr_matrix_f0 <= (OTHERS => '0');
286 -- addr_matrix_f0_1 <= (OTHERS => '0');
387 -- addr_matrix_f0_1 <= (OTHERS => '0');
287 addr_matrix_f1 <= (OTHERS => '0');
388 -- addr_matrix_f1 <= (OTHERS => '0');
288 addr_matrix_f2 <= (OTHERS => '0');
389 -- addr_matrix_f2 <= (OTHERS => '0');
289
390
290
391
291 PROCESS (clk25MHz, rstn)
392 PROCESS (clk25MHz, rstn)
292 BEGIN -- PROCESS
393 BEGIN -- PROCESS
293 IF rstn = '0' THEN -- asynchronous reset (active low)
394 IF rstn = '0' THEN -- asynchronous reset (active low)
294
395
295 dma_ren <= '1';
396 dma_ren <= '1';
296 dma_done <= '0';
397 dma_done <= '0';
297 ren_counter <= 0;
398 ren_counter <= 0;
298 ELSIF clk25MHz'event AND clk25MHz = '1' THEN -- rising clock edge
399 ELSIF clk25MHz'event AND clk25MHz = '1' THEN -- rising clock edge
299 dma_ren <= '1';
400 dma_ren <= '1';
300 dma_done <= '0';
401 dma_done <= '0';
301
402
302 IF dma_valid_burst = '1' THEN
403 IF dma_valid_burst = '1' THEN
303 ren_counter <= 17;
404 ren_counter <= 17;
304 END IF;
405 END IF;
305
406
306 IF ren_counter > 1 THEN
407 IF ren_counter > 1 THEN
307 ren_counter <= ren_counter - 1;
408 ren_counter <= ren_counter - 1;
308 dma_ren <= '0';
409 dma_ren <= '0';
309 END IF;
410 END IF;
310
411
311 IF ren_counter = 1 THEN
412 IF ren_counter = 1 THEN
312 ren_counter <= 0;
413 ren_counter <= 0;
313 dma_done <= '1';
414 dma_done <= '1';
314 END IF;
415 END IF;
315
416
316 END IF;
417 END IF;
317 END PROCESS;
418 END PROCESS;
318
419
319
420
320 END beh;
421 END beh;
321
422
@@ -1,716 +1,722
1 LIBRARY ieee;
1 LIBRARY ieee;
2 USE ieee.std_logic_1164.ALL;
2 USE ieee.std_logic_1164.ALL;
3 USE ieee.numeric_std.ALL;
3 USE ieee.numeric_std.ALL;
4
4
5 LIBRARY lpp;
5 LIBRARY lpp;
6 USE lpp.lpp_ad_conv.ALL;
6 USE lpp.lpp_ad_conv.ALL;
7 USE lpp.iir_filter.ALL;
7 USE lpp.iir_filter.ALL;
8 USE lpp.FILTERcfg.ALL;
8 USE lpp.FILTERcfg.ALL;
9 USE lpp.lpp_memory.ALL;
9 USE lpp.lpp_memory.ALL;
10 USE lpp.lpp_waveform_pkg.ALL;
10 USE lpp.lpp_waveform_pkg.ALL;
11 USE lpp.lpp_dma_pkg.ALL;
11 USE lpp.lpp_dma_pkg.ALL;
12 USE lpp.lpp_top_lfr_pkg.ALL;
12 USE lpp.lpp_top_lfr_pkg.ALL;
13 USE lpp.lpp_lfr_pkg.ALL;
13 USE lpp.lpp_lfr_pkg.ALL;
14 USE lpp.general_purpose.ALL;
14 USE lpp.general_purpose.ALL;
15
15
16 LIBRARY techmap;
16 LIBRARY techmap;
17 USE techmap.gencomp.ALL;
17 USE techmap.gencomp.ALL;
18
18
19 LIBRARY grlib;
19 LIBRARY grlib;
20 USE grlib.amba.ALL;
20 USE grlib.amba.ALL;
21 USE grlib.stdlib.ALL;
21 USE grlib.stdlib.ALL;
22 USE grlib.devices.ALL;
22 USE grlib.devices.ALL;
23 USE GRLIB.DMA2AHB_Package.ALL;
23 USE GRLIB.DMA2AHB_Package.ALL;
24
24
25 ENTITY lpp_lfr IS
25 ENTITY lpp_lfr IS
26 GENERIC (
26 GENERIC (
27 Mem_use : INTEGER := use_RAM;
27 Mem_use : INTEGER := use_RAM;
28 nb_data_by_buffer_size : INTEGER := 11;
28 nb_data_by_buffer_size : INTEGER := 11;
29 nb_word_by_buffer_size : INTEGER := 11;
29 nb_word_by_buffer_size : INTEGER := 11;
30 nb_snapshot_param_size : INTEGER := 11;
30 nb_snapshot_param_size : INTEGER := 11;
31 delta_vector_size : INTEGER := 20;
31 delta_vector_size : INTEGER := 20;
32 delta_vector_size_f0_2 : INTEGER := 7;
32 delta_vector_size_f0_2 : INTEGER := 7;
33
33
34 pindex : INTEGER := 4;
34 pindex : INTEGER := 4;
35 paddr : INTEGER := 4;
35 paddr : INTEGER := 4;
36 pmask : INTEGER := 16#fff#;
36 pmask : INTEGER := 16#fff#;
37 pirq_ms : INTEGER := 0;
37 pirq_ms : INTEGER := 0;
38 pirq_wfp : INTEGER := 1;
38 pirq_wfp : INTEGER := 1;
39
39
40 hindex : INTEGER := 2;
40 hindex : INTEGER := 2;
41
41
42 top_lfr_version : STD_LOGIC_VECTOR(23 DOWNTO 0) := (OTHERS => '0')
42 top_lfr_version : STD_LOGIC_VECTOR(23 DOWNTO 0) := (OTHERS => '0')
43
43
44 );
44 );
45 PORT (
45 PORT (
46 clk : IN STD_LOGIC;
46 clk : IN STD_LOGIC;
47 rstn : IN STD_LOGIC;
47 rstn : IN STD_LOGIC;
48 -- SAMPLE
48 -- SAMPLE
49 sample_B : IN Samples(2 DOWNTO 0);
49 sample_B : IN Samples(2 DOWNTO 0);
50 sample_E : IN Samples(4 DOWNTO 0);
50 sample_E : IN Samples(4 DOWNTO 0);
51 sample_val : IN STD_LOGIC;
51 sample_val : IN STD_LOGIC;
52 -- APB
52 -- APB
53 apbi : IN apb_slv_in_type;
53 apbi : IN apb_slv_in_type;
54 apbo : OUT apb_slv_out_type;
54 apbo : OUT apb_slv_out_type;
55 -- AHB
55 -- AHB
56 ahbi : IN AHB_Mst_In_Type;
56 ahbi : IN AHB_Mst_In_Type;
57 ahbo : OUT AHB_Mst_Out_Type;
57 ahbo : OUT AHB_Mst_Out_Type;
58 -- TIME
58 -- TIME
59 coarse_time : IN STD_LOGIC_VECTOR(31 DOWNTO 0); -- todo
59 coarse_time : IN STD_LOGIC_VECTOR(31 DOWNTO 0); -- todo
60 fine_time : IN STD_LOGIC_VECTOR(15 DOWNTO 0); -- todo
60 fine_time : IN STD_LOGIC_VECTOR(15 DOWNTO 0); -- todo
61 --
61 --
62 data_shaping_BW : OUT STD_LOGIC;
62 data_shaping_BW : OUT STD_LOGIC;
63 --
63 --
64 observation_reg : OUT STD_LOGIC_VECTOR(31 DOWNTO 0)
64 observation_reg : OUT STD_LOGIC_VECTOR(31 DOWNTO 0)
65
65
66 --debug
66 --debug
67 --debug_f0_data : OUT STD_LOGIC_VECTOR(95 DOWNTO 0);
67 --debug_f0_data : OUT STD_LOGIC_VECTOR(95 DOWNTO 0);
68 --debug_f0_data_valid : OUT STD_LOGIC;
68 --debug_f0_data_valid : OUT STD_LOGIC;
69 --debug_f1_data : OUT STD_LOGIC_VECTOR(95 DOWNTO 0);
69 --debug_f1_data : OUT STD_LOGIC_VECTOR(95 DOWNTO 0);
70 --debug_f1_data_valid : OUT STD_LOGIC;
70 --debug_f1_data_valid : OUT STD_LOGIC;
71 --debug_f2_data : OUT STD_LOGIC_VECTOR(95 DOWNTO 0);
71 --debug_f2_data : OUT STD_LOGIC_VECTOR(95 DOWNTO 0);
72 --debug_f2_data_valid : OUT STD_LOGIC;
72 --debug_f2_data_valid : OUT STD_LOGIC;
73 --debug_f3_data : OUT STD_LOGIC_VECTOR(95 DOWNTO 0);
73 --debug_f3_data : OUT STD_LOGIC_VECTOR(95 DOWNTO 0);
74 --debug_f3_data_valid : OUT STD_LOGIC;
74 --debug_f3_data_valid : OUT STD_LOGIC;
75
75
76 ---- debug FIFO_IN
76 ---- debug FIFO_IN
77 --debug_f0_data_fifo_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
77 --debug_f0_data_fifo_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
78 --debug_f0_data_fifo_in_valid : OUT STD_LOGIC;
78 --debug_f0_data_fifo_in_valid : OUT STD_LOGIC;
79 --debug_f1_data_fifo_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
79 --debug_f1_data_fifo_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
80 --debug_f1_data_fifo_in_valid : OUT STD_LOGIC;
80 --debug_f1_data_fifo_in_valid : OUT STD_LOGIC;
81 --debug_f2_data_fifo_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
81 --debug_f2_data_fifo_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
82 --debug_f2_data_fifo_in_valid : OUT STD_LOGIC;
82 --debug_f2_data_fifo_in_valid : OUT STD_LOGIC;
83 --debug_f3_data_fifo_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
83 --debug_f3_data_fifo_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
84 --debug_f3_data_fifo_in_valid : OUT STD_LOGIC;
84 --debug_f3_data_fifo_in_valid : OUT STD_LOGIC;
85
85
86 ----debug FIFO OUT
86 ----debug FIFO OUT
87 --debug_f0_data_fifo_out : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
87 --debug_f0_data_fifo_out : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
88 --debug_f0_data_fifo_out_valid : OUT STD_LOGIC;
88 --debug_f0_data_fifo_out_valid : OUT STD_LOGIC;
89 --debug_f1_data_fifo_out : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
89 --debug_f1_data_fifo_out : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
90 --debug_f1_data_fifo_out_valid : OUT STD_LOGIC;
90 --debug_f1_data_fifo_out_valid : OUT STD_LOGIC;
91 --debug_f2_data_fifo_out : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
91 --debug_f2_data_fifo_out : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
92 --debug_f2_data_fifo_out_valid : OUT STD_LOGIC;
92 --debug_f2_data_fifo_out_valid : OUT STD_LOGIC;
93 --debug_f3_data_fifo_out : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
93 --debug_f3_data_fifo_out : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
94 --debug_f3_data_fifo_out_valid : OUT STD_LOGIC;
94 --debug_f3_data_fifo_out_valid : OUT STD_LOGIC;
95
95
96 ----debug DMA IN
96 ----debug DMA IN
97 --debug_f0_data_dma_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
97 --debug_f0_data_dma_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
98 --debug_f0_data_dma_in_valid : OUT STD_LOGIC;
98 --debug_f0_data_dma_in_valid : OUT STD_LOGIC;
99 --debug_f1_data_dma_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
99 --debug_f1_data_dma_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
100 --debug_f1_data_dma_in_valid : OUT STD_LOGIC;
100 --debug_f1_data_dma_in_valid : OUT STD_LOGIC;
101 --debug_f2_data_dma_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
101 --debug_f2_data_dma_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
102 --debug_f2_data_dma_in_valid : OUT STD_LOGIC;
102 --debug_f2_data_dma_in_valid : OUT STD_LOGIC;
103 --debug_f3_data_dma_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
103 --debug_f3_data_dma_in : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
104 --debug_f3_data_dma_in_valid : OUT STD_LOGIC
104 --debug_f3_data_dma_in_valid : OUT STD_LOGIC
105 );
105 );
106 END lpp_lfr;
106 END lpp_lfr;
107
107
108 ARCHITECTURE beh OF lpp_lfr IS
108 ARCHITECTURE beh OF lpp_lfr IS
109 --SIGNAL sample : Samples14v(7 DOWNTO 0);
109 --SIGNAL sample : Samples14v(7 DOWNTO 0);
110 SIGNAL sample_s : Samples(7 DOWNTO 0);
110 SIGNAL sample_s : Samples(7 DOWNTO 0);
111 --
111 --
112 SIGNAL data_shaping_SP0 : STD_LOGIC;
112 SIGNAL data_shaping_SP0 : STD_LOGIC;
113 SIGNAL data_shaping_SP1 : STD_LOGIC;
113 SIGNAL data_shaping_SP1 : STD_LOGIC;
114 SIGNAL data_shaping_R0 : STD_LOGIC;
114 SIGNAL data_shaping_R0 : STD_LOGIC;
115 SIGNAL data_shaping_R1 : STD_LOGIC;
115 SIGNAL data_shaping_R1 : STD_LOGIC;
116 --
116 --
117 SIGNAL sample_f0_wen : STD_LOGIC_VECTOR(4 DOWNTO 0);
117 SIGNAL sample_f0_wen : STD_LOGIC_VECTOR(4 DOWNTO 0);
118 SIGNAL sample_f1_wen : STD_LOGIC_VECTOR(4 DOWNTO 0);
118 SIGNAL sample_f1_wen : STD_LOGIC_VECTOR(4 DOWNTO 0);
119 SIGNAL sample_f3_wen : STD_LOGIC_VECTOR(4 DOWNTO 0);
119 SIGNAL sample_f3_wen : STD_LOGIC_VECTOR(4 DOWNTO 0);
120 --
120 --
121 SIGNAL sample_f0_val : STD_LOGIC;
121 SIGNAL sample_f0_val : STD_LOGIC;
122 SIGNAL sample_f1_val : STD_LOGIC;
122 SIGNAL sample_f1_val : STD_LOGIC;
123 SIGNAL sample_f2_val : STD_LOGIC;
123 SIGNAL sample_f2_val : STD_LOGIC;
124 SIGNAL sample_f3_val : STD_LOGIC;
124 SIGNAL sample_f3_val : STD_LOGIC;
125 --
125 --
126 SIGNAL sample_f0_data : STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
126 SIGNAL sample_f0_data : STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
127 SIGNAL sample_f1_data : STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
127 SIGNAL sample_f1_data : STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
128 SIGNAL sample_f2_data : STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
128 SIGNAL sample_f2_data : STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
129 SIGNAL sample_f3_data : STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
129 SIGNAL sample_f3_data : STD_LOGIC_VECTOR((6*16)-1 DOWNTO 0);
130 --
130 --
131 SIGNAL sample_f0_wdata : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
131 SIGNAL sample_f0_wdata : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
132 SIGNAL sample_f1_wdata : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
132 SIGNAL sample_f1_wdata : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
133 SIGNAL sample_f3_wdata : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
133 SIGNAL sample_f3_wdata : STD_LOGIC_VECTOR((5*16)-1 DOWNTO 0);
134
134
135 -- SM
135 -- SM
136 SIGNAL ready_matrix_f0 : STD_LOGIC;
136 SIGNAL ready_matrix_f0 : STD_LOGIC;
137 SIGNAL ready_matrix_f0_1 : STD_LOGIC;
137 SIGNAL ready_matrix_f0_1 : STD_LOGIC;
138 SIGNAL ready_matrix_f1 : STD_LOGIC;
138 SIGNAL ready_matrix_f1 : STD_LOGIC;
139 SIGNAL ready_matrix_f2 : STD_LOGIC;
139 SIGNAL ready_matrix_f2 : STD_LOGIC;
140 -- SIGNAL error_anticipating_empty_fifo : STD_LOGIC;
140 -- SIGNAL error_anticipating_empty_fifo : STD_LOGIC;
141 SIGNAL error_bad_component_error : STD_LOGIC;
141 SIGNAL error_bad_component_error : STD_LOGIC;
142 -- SIGNAL debug_reg : STD_LOGIC_VECTOR(31 DOWNTO 0);
142 -- SIGNAL debug_reg : STD_LOGIC_VECTOR(31 DOWNTO 0);
143 SIGNAL status_ready_matrix_f0 : STD_LOGIC;
143 SIGNAL status_ready_matrix_f0 : STD_LOGIC;
144 SIGNAL status_ready_matrix_f0_1 : STD_LOGIC;
144 SIGNAL status_ready_matrix_f0_1 : STD_LOGIC;
145 SIGNAL status_ready_matrix_f1 : STD_LOGIC;
145 SIGNAL status_ready_matrix_f1 : STD_LOGIC;
146 SIGNAL status_ready_matrix_f2 : STD_LOGIC;
146 SIGNAL status_ready_matrix_f2 : STD_LOGIC;
147 -- SIGNAL status_error_anticipating_empty_fifo : STD_LOGIC;
147 -- SIGNAL status_error_anticipating_empty_fifo : STD_LOGIC;
148 -- SIGNAL status_error_bad_component_error : STD_LOGIC;
148 -- SIGNAL status_error_bad_component_error : STD_LOGIC;
149 SIGNAL config_active_interruption_onNewMatrix : STD_LOGIC;
149 SIGNAL config_active_interruption_onNewMatrix : STD_LOGIC;
150 SIGNAL config_active_interruption_onError : STD_LOGIC;
150 SIGNAL config_active_interruption_onError : STD_LOGIC;
151 SIGNAL addr_matrix_f0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
151 SIGNAL addr_matrix_f0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
152 -- SIGNAL addr_matrix_f0_1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
152 -- SIGNAL addr_matrix_f0_1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
153 SIGNAL addr_matrix_f1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
153 SIGNAL addr_matrix_f1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
154 SIGNAL addr_matrix_f2 : STD_LOGIC_VECTOR(31 DOWNTO 0);
154 SIGNAL addr_matrix_f2 : STD_LOGIC_VECTOR(31 DOWNTO 0);
155
155
156 -- WFP
156 -- WFP
157 SIGNAL status_full : STD_LOGIC_VECTOR(3 DOWNTO 0);
157 SIGNAL status_full : STD_LOGIC_VECTOR(3 DOWNTO 0);
158 SIGNAL status_full_ack : STD_LOGIC_VECTOR(3 DOWNTO 0);
158 SIGNAL status_full_ack : STD_LOGIC_VECTOR(3 DOWNTO 0);
159 SIGNAL status_full_err : STD_LOGIC_VECTOR(3 DOWNTO 0);
159 SIGNAL status_full_err : STD_LOGIC_VECTOR(3 DOWNTO 0);
160 SIGNAL status_new_err : STD_LOGIC_VECTOR(3 DOWNTO 0);
160 SIGNAL status_new_err : STD_LOGIC_VECTOR(3 DOWNTO 0);
161 SIGNAL delta_snapshot : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
161 SIGNAL delta_snapshot : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
162 SIGNAL delta_f0 : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
162 SIGNAL delta_f0 : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
163 SIGNAL delta_f0_2 : STD_LOGIC_VECTOR(delta_vector_size_f0_2-1 DOWNTO 0);
163 SIGNAL delta_f0_2 : STD_LOGIC_VECTOR(delta_vector_size_f0_2-1 DOWNTO 0);
164 SIGNAL delta_f1 : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
164 SIGNAL delta_f1 : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
165 SIGNAL delta_f2 : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
165 SIGNAL delta_f2 : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
166
166
167 SIGNAL nb_data_by_buffer : STD_LOGIC_VECTOR(nb_data_by_buffer_size-1 DOWNTO 0);
167 SIGNAL nb_data_by_buffer : STD_LOGIC_VECTOR(nb_data_by_buffer_size-1 DOWNTO 0);
168 SIGNAL nb_word_by_buffer : STD_LOGIC_VECTOR(nb_word_by_buffer_size-1 DOWNTO 0);
168 SIGNAL nb_word_by_buffer : STD_LOGIC_VECTOR(nb_word_by_buffer_size-1 DOWNTO 0);
169 SIGNAL nb_snapshot_param : STD_LOGIC_VECTOR(nb_snapshot_param_size-1 DOWNTO 0);
169 SIGNAL nb_snapshot_param : STD_LOGIC_VECTOR(nb_snapshot_param_size-1 DOWNTO 0);
170 SIGNAL enable_f0 : STD_LOGIC;
170 SIGNAL enable_f0 : STD_LOGIC;
171 SIGNAL enable_f1 : STD_LOGIC;
171 SIGNAL enable_f1 : STD_LOGIC;
172 SIGNAL enable_f2 : STD_LOGIC;
172 SIGNAL enable_f2 : STD_LOGIC;
173 SIGNAL enable_f3 : STD_LOGIC;
173 SIGNAL enable_f3 : STD_LOGIC;
174 SIGNAL burst_f0 : STD_LOGIC;
174 SIGNAL burst_f0 : STD_LOGIC;
175 SIGNAL burst_f1 : STD_LOGIC;
175 SIGNAL burst_f1 : STD_LOGIC;
176 SIGNAL burst_f2 : STD_LOGIC;
176 SIGNAL burst_f2 : STD_LOGIC;
177 SIGNAL addr_data_f0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
177 SIGNAL addr_data_f0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
178 SIGNAL addr_data_f1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
178 SIGNAL addr_data_f1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
179 SIGNAL addr_data_f2 : STD_LOGIC_VECTOR(31 DOWNTO 0);
179 SIGNAL addr_data_f2 : STD_LOGIC_VECTOR(31 DOWNTO 0);
180 SIGNAL addr_data_f3 : STD_LOGIC_VECTOR(31 DOWNTO 0);
180 SIGNAL addr_data_f3 : STD_LOGIC_VECTOR(31 DOWNTO 0);
181
181
182 SIGNAL run : STD_LOGIC;
182 SIGNAL run : STD_LOGIC;
183 SIGNAL start_date : STD_LOGIC_VECTOR(30 DOWNTO 0);
183 SIGNAL start_date : STD_LOGIC_VECTOR(30 DOWNTO 0);
184
184
185 SIGNAL data_f0_addr_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
185 SIGNAL data_f0_addr_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
186 SIGNAL data_f0_data_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
186 SIGNAL data_f0_data_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
187 SIGNAL data_f0_data_out_valid : STD_LOGIC;
187 SIGNAL data_f0_data_out_valid : STD_LOGIC;
188 SIGNAL data_f0_data_out_valid_burst : STD_LOGIC;
188 SIGNAL data_f0_data_out_valid_burst : STD_LOGIC;
189 SIGNAL data_f0_data_out_ren : STD_LOGIC;
189 SIGNAL data_f0_data_out_ren : STD_LOGIC;
190 --f1
190 --f1
191 SIGNAL data_f1_addr_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
191 SIGNAL data_f1_addr_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
192 SIGNAL data_f1_data_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
192 SIGNAL data_f1_data_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
193 SIGNAL data_f1_data_out_valid : STD_LOGIC;
193 SIGNAL data_f1_data_out_valid : STD_LOGIC;
194 SIGNAL data_f1_data_out_valid_burst : STD_LOGIC;
194 SIGNAL data_f1_data_out_valid_burst : STD_LOGIC;
195 SIGNAL data_f1_data_out_ren : STD_LOGIC;
195 SIGNAL data_f1_data_out_ren : STD_LOGIC;
196 --f2
196 --f2
197 SIGNAL data_f2_addr_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
197 SIGNAL data_f2_addr_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
198 SIGNAL data_f2_data_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
198 SIGNAL data_f2_data_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
199 SIGNAL data_f2_data_out_valid : STD_LOGIC;
199 SIGNAL data_f2_data_out_valid : STD_LOGIC;
200 SIGNAL data_f2_data_out_valid_burst : STD_LOGIC;
200 SIGNAL data_f2_data_out_valid_burst : STD_LOGIC;
201 SIGNAL data_f2_data_out_ren : STD_LOGIC;
201 SIGNAL data_f2_data_out_ren : STD_LOGIC;
202 --f3
202 --f3
203 SIGNAL data_f3_addr_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
203 SIGNAL data_f3_addr_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
204 SIGNAL data_f3_data_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
204 SIGNAL data_f3_data_out : STD_LOGIC_VECTOR(31 DOWNTO 0);
205 SIGNAL data_f3_data_out_valid : STD_LOGIC;
205 SIGNAL data_f3_data_out_valid : STD_LOGIC;
206 SIGNAL data_f3_data_out_valid_burst : STD_LOGIC;
206 SIGNAL data_f3_data_out_valid_burst : STD_LOGIC;
207 SIGNAL data_f3_data_out_ren : STD_LOGIC;
207 SIGNAL data_f3_data_out_ren : STD_LOGIC;
208
208
209 -----------------------------------------------------------------------------
209 -----------------------------------------------------------------------------
210 --
210 --
211 -----------------------------------------------------------------------------
211 -----------------------------------------------------------------------------
212 SIGNAL data_f0_addr_out_s : STD_LOGIC_VECTOR(31 DOWNTO 0);
212 SIGNAL data_f0_addr_out_s : STD_LOGIC_VECTOR(31 DOWNTO 0);
213 SIGNAL data_f0_data_out_valid_s : STD_LOGIC;
213 SIGNAL data_f0_data_out_valid_s : STD_LOGIC;
214 SIGNAL data_f0_data_out_valid_burst_s : STD_LOGIC;
214 SIGNAL data_f0_data_out_valid_burst_s : STD_LOGIC;
215 --f1
215 --f1
216 SIGNAL data_f1_addr_out_s : STD_LOGIC_VECTOR(31 DOWNTO 0);
216 SIGNAL data_f1_addr_out_s : STD_LOGIC_VECTOR(31 DOWNTO 0);
217 SIGNAL data_f1_data_out_valid_s : STD_LOGIC;
217 SIGNAL data_f1_data_out_valid_s : STD_LOGIC;
218 SIGNAL data_f1_data_out_valid_burst_s : STD_LOGIC;
218 SIGNAL data_f1_data_out_valid_burst_s : STD_LOGIC;
219 --f2
219 --f2
220 SIGNAL data_f2_addr_out_s : STD_LOGIC_VECTOR(31 DOWNTO 0);
220 SIGNAL data_f2_addr_out_s : STD_LOGIC_VECTOR(31 DOWNTO 0);
221 SIGNAL data_f2_data_out_valid_s : STD_LOGIC;
221 SIGNAL data_f2_data_out_valid_s : STD_LOGIC;
222 SIGNAL data_f2_data_out_valid_burst_s : STD_LOGIC;
222 SIGNAL data_f2_data_out_valid_burst_s : STD_LOGIC;
223 --f3
223 --f3
224 SIGNAL data_f3_addr_out_s : STD_LOGIC_VECTOR(31 DOWNTO 0);
224 SIGNAL data_f3_addr_out_s : STD_LOGIC_VECTOR(31 DOWNTO 0);
225 SIGNAL data_f3_data_out_valid_s : STD_LOGIC;
225 SIGNAL data_f3_data_out_valid_s : STD_LOGIC;
226 SIGNAL data_f3_data_out_valid_burst_s : STD_LOGIC;
226 SIGNAL data_f3_data_out_valid_burst_s : STD_LOGIC;
227
227
228 -----------------------------------------------------------------------------
228 -----------------------------------------------------------------------------
229 -- DMA RR
229 -- DMA RR
230 -----------------------------------------------------------------------------
230 -----------------------------------------------------------------------------
231 SIGNAL dma_sel_valid : STD_LOGIC;
231 SIGNAL dma_sel_valid : STD_LOGIC;
232 SIGNAL dma_rr_valid : STD_LOGIC_VECTOR(3 DOWNTO 0);
232 SIGNAL dma_rr_valid : STD_LOGIC_VECTOR(3 DOWNTO 0);
233 SIGNAL dma_rr_grant_s : STD_LOGIC_VECTOR(3 DOWNTO 0);
233 SIGNAL dma_rr_grant_s : STD_LOGIC_VECTOR(3 DOWNTO 0);
234 SIGNAL dma_rr_grant_ms : STD_LOGIC_VECTOR(3 DOWNTO 0);
234 SIGNAL dma_rr_grant_ms : STD_LOGIC_VECTOR(3 DOWNTO 0);
235 SIGNAL dma_rr_valid_ms : STD_LOGIC_VECTOR(3 DOWNTO 0);
235 SIGNAL dma_rr_valid_ms : STD_LOGIC_VECTOR(3 DOWNTO 0);
236
236
237 SIGNAL dma_rr_grant : STD_LOGIC_VECTOR(4 DOWNTO 0);
237 SIGNAL dma_rr_grant : STD_LOGIC_VECTOR(4 DOWNTO 0);
238 SIGNAL dma_sel : STD_LOGIC_VECTOR(4 DOWNTO 0);
238 SIGNAL dma_sel : STD_LOGIC_VECTOR(4 DOWNTO 0);
239
239
240 -----------------------------------------------------------------------------
240 -----------------------------------------------------------------------------
241 -- DMA_REG
241 -- DMA_REG
242 -----------------------------------------------------------------------------
242 -----------------------------------------------------------------------------
243 SIGNAL ongoing_reg : STD_LOGIC;
243 SIGNAL ongoing_reg : STD_LOGIC;
244 SIGNAL dma_sel_reg : STD_LOGIC_VECTOR(3 DOWNTO 0);
244 SIGNAL dma_sel_reg : STD_LOGIC_VECTOR(3 DOWNTO 0);
245 SIGNAL dma_send_reg : STD_LOGIC;
245 SIGNAL dma_send_reg : STD_LOGIC;
246 SIGNAL dma_valid_burst_reg : STD_LOGIC; -- (1 => BURST , 0 => SINGLE)
246 SIGNAL dma_valid_burst_reg : STD_LOGIC; -- (1 => BURST , 0 => SINGLE)
247 SIGNAL dma_address_reg : STD_LOGIC_VECTOR(31 DOWNTO 0);
247 SIGNAL dma_address_reg : STD_LOGIC_VECTOR(31 DOWNTO 0);
248 SIGNAL dma_data_reg : STD_LOGIC_VECTOR(31 DOWNTO 0);
248 SIGNAL dma_data_reg : STD_LOGIC_VECTOR(31 DOWNTO 0);
249
249
250
250
251 -----------------------------------------------------------------------------
251 -----------------------------------------------------------------------------
252 -- DMA
252 -- DMA
253 -----------------------------------------------------------------------------
253 -----------------------------------------------------------------------------
254 SIGNAL dma_send : STD_LOGIC;
254 SIGNAL dma_send : STD_LOGIC;
255 SIGNAL dma_valid_burst : STD_LOGIC; -- (1 => BURST , 0 => SINGLE)
255 SIGNAL dma_valid_burst : STD_LOGIC; -- (1 => BURST , 0 => SINGLE)
256 SIGNAL dma_done : STD_LOGIC;
256 SIGNAL dma_done : STD_LOGIC;
257 SIGNAL dma_ren : STD_LOGIC;
257 SIGNAL dma_ren : STD_LOGIC;
258 SIGNAL dma_address : STD_LOGIC_VECTOR(31 DOWNTO 0);
258 SIGNAL dma_address : STD_LOGIC_VECTOR(31 DOWNTO 0);
259 SIGNAL dma_data : STD_LOGIC_VECTOR(31 DOWNTO 0);
259 SIGNAL dma_data : STD_LOGIC_VECTOR(31 DOWNTO 0);
260 SIGNAL dma_data_2 : STD_LOGIC_VECTOR(31 DOWNTO 0);
260 SIGNAL dma_data_2 : STD_LOGIC_VECTOR(31 DOWNTO 0);
261
261
262 -----------------------------------------------------------------------------
262 -----------------------------------------------------------------------------
263 -- MS
263 -- MS
264 -----------------------------------------------------------------------------
264 -----------------------------------------------------------------------------
265
265
266 SIGNAL data_ms_addr : STD_LOGIC_VECTOR(31 DOWNTO 0);
266 SIGNAL data_ms_addr : STD_LOGIC_VECTOR(31 DOWNTO 0);
267 SIGNAL data_ms_data : STD_LOGIC_VECTOR(31 DOWNTO 0);
267 SIGNAL data_ms_data : STD_LOGIC_VECTOR(31 DOWNTO 0);
268 SIGNAL data_ms_valid : STD_LOGIC;
268 SIGNAL data_ms_valid : STD_LOGIC;
269 SIGNAL data_ms_valid_burst : STD_LOGIC;
269 SIGNAL data_ms_valid_burst : STD_LOGIC;
270 SIGNAL data_ms_ren : STD_LOGIC;
270 SIGNAL data_ms_ren : STD_LOGIC;
271 SIGNAL data_ms_done : STD_LOGIC;
271 SIGNAL data_ms_done : STD_LOGIC;
272
272
273 SIGNAL run_ms : STD_LOGIC;
273 SIGNAL run_ms : STD_LOGIC;
274 SIGNAL ms_softandhard_rstn : STD_LOGIC;
274 SIGNAL ms_softandhard_rstn : STD_LOGIC;
275
275
276 SIGNAL matrix_time_f0 : STD_LOGIC_VECTOR(47 DOWNTO 0);
276 SIGNAL matrix_time_f0 : STD_LOGIC_VECTOR(47 DOWNTO 0);
277 -- SIGNAL matrix_time_f0_1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
277 -- SIGNAL matrix_time_f0_1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
278 SIGNAL matrix_time_f1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
278 SIGNAL matrix_time_f1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
279 SIGNAL matrix_time_f2 : STD_LOGIC_VECTOR(47 DOWNTO 0);
279 SIGNAL matrix_time_f2 : STD_LOGIC_VECTOR(47 DOWNTO 0);
280
280
281
281
282 SIGNAL error_buffer_full : STD_LOGIC;
282 SIGNAL error_buffer_full : STD_LOGIC;
283 SIGNAL error_input_fifo_write : STD_LOGIC_VECTOR(2 DOWNTO 0);
283 SIGNAL error_input_fifo_write : STD_LOGIC_VECTOR(2 DOWNTO 0);
284
284
285 SIGNAL debug_ms : STD_LOGIC_VECTOR(31 DOWNTO 0);
286
285 BEGIN
287 BEGIN
286
288
287 sample_s(4 DOWNTO 0) <= sample_E(4 DOWNTO 0);
289 sample_s(4 DOWNTO 0) <= sample_E(4 DOWNTO 0);
288 sample_s(7 DOWNTO 5) <= sample_B(2 DOWNTO 0);
290 sample_s(7 DOWNTO 5) <= sample_B(2 DOWNTO 0);
289
291
290 --all_channel : FOR i IN 7 DOWNTO 0 GENERATE
292 --all_channel : FOR i IN 7 DOWNTO 0 GENERATE
291 -- sample_s(i) <= sample(i)(13) & sample(i)(13) & sample(i);
293 -- sample_s(i) <= sample(i)(13) & sample(i)(13) & sample(i);
292 --END GENERATE all_channel;
294 --END GENERATE all_channel;
293
295
294 -----------------------------------------------------------------------------
296 -----------------------------------------------------------------------------
295 lpp_lfr_filter_1 : lpp_lfr_filter
297 lpp_lfr_filter_1 : lpp_lfr_filter
296 GENERIC MAP (
298 GENERIC MAP (
297 Mem_use => Mem_use)
299 Mem_use => Mem_use)
298 PORT MAP (
300 PORT MAP (
299 sample => sample_s,
301 sample => sample_s,
300 sample_val => sample_val,
302 sample_val => sample_val,
301 clk => clk,
303 clk => clk,
302 rstn => rstn,
304 rstn => rstn,
303 data_shaping_SP0 => data_shaping_SP0,
305 data_shaping_SP0 => data_shaping_SP0,
304 data_shaping_SP1 => data_shaping_SP1,
306 data_shaping_SP1 => data_shaping_SP1,
305 data_shaping_R0 => data_shaping_R0,
307 data_shaping_R0 => data_shaping_R0,
306 data_shaping_R1 => data_shaping_R1,
308 data_shaping_R1 => data_shaping_R1,
307 sample_f0_val => sample_f0_val,
309 sample_f0_val => sample_f0_val,
308 sample_f1_val => sample_f1_val,
310 sample_f1_val => sample_f1_val,
309 sample_f2_val => sample_f2_val,
311 sample_f2_val => sample_f2_val,
310 sample_f3_val => sample_f3_val,
312 sample_f3_val => sample_f3_val,
311 sample_f0_wdata => sample_f0_data,
313 sample_f0_wdata => sample_f0_data,
312 sample_f1_wdata => sample_f1_data,
314 sample_f1_wdata => sample_f1_data,
313 sample_f2_wdata => sample_f2_data,
315 sample_f2_wdata => sample_f2_data,
314 sample_f3_wdata => sample_f3_data);
316 sample_f3_wdata => sample_f3_data);
315
317
316 -----------------------------------------------------------------------------
318 -----------------------------------------------------------------------------
317 lpp_lfr_apbreg_1 : lpp_lfr_apbreg
319 lpp_lfr_apbreg_1 : lpp_lfr_apbreg
318 GENERIC MAP (
320 GENERIC MAP (
319 nb_data_by_buffer_size => nb_data_by_buffer_size,
321 nb_data_by_buffer_size => nb_data_by_buffer_size,
320 nb_word_by_buffer_size => nb_word_by_buffer_size,
322 nb_word_by_buffer_size => nb_word_by_buffer_size,
321 nb_snapshot_param_size => nb_snapshot_param_size,
323 nb_snapshot_param_size => nb_snapshot_param_size,
322 delta_vector_size => delta_vector_size,
324 delta_vector_size => delta_vector_size,
323 delta_vector_size_f0_2 => delta_vector_size_f0_2,
325 delta_vector_size_f0_2 => delta_vector_size_f0_2,
324 pindex => pindex,
326 pindex => pindex,
325 paddr => paddr,
327 paddr => paddr,
326 pmask => pmask,
328 pmask => pmask,
327 pirq_ms => pirq_ms,
329 pirq_ms => pirq_ms,
328 pirq_wfp => pirq_wfp,
330 pirq_wfp => pirq_wfp,
329 top_lfr_version => top_lfr_version)
331 top_lfr_version => top_lfr_version)
330 PORT MAP (
332 PORT MAP (
331 HCLK => clk,
333 HCLK => clk,
332 HRESETn => rstn,
334 HRESETn => rstn,
333 apbi => apbi,
335 apbi => apbi,
334 apbo => apbo,
336 apbo => apbo,
335
337
336 run_ms => run_ms,
338 run_ms => run_ms,
337
339
338 ready_matrix_f0 => ready_matrix_f0,
340 ready_matrix_f0 => ready_matrix_f0,
339 -- ready_matrix_f0_1 => ready_matrix_f0_1,
341 -- ready_matrix_f0_1 => ready_matrix_f0_1,
340 ready_matrix_f1 => ready_matrix_f1,
342 ready_matrix_f1 => ready_matrix_f1,
341 ready_matrix_f2 => ready_matrix_f2,
343 ready_matrix_f2 => ready_matrix_f2,
342 -- error_anticipating_empty_fifo => error_anticipating_empty_fifo,
344 -- error_anticipating_empty_fifo => error_anticipating_empty_fifo,
343 error_bad_component_error => error_bad_component_error,
345 error_bad_component_error => error_bad_component_error,
344 error_buffer_full => error_buffer_full, -- TODO
346 error_buffer_full => error_buffer_full, -- TODO
345 error_input_fifo_write => error_input_fifo_write, -- TODO
347 error_input_fifo_write => error_input_fifo_write, -- TODO
346 -- debug_reg => debug_reg,
348 -- debug_reg => debug_reg,
347 status_ready_matrix_f0 => status_ready_matrix_f0,
349 status_ready_matrix_f0 => status_ready_matrix_f0,
348 -- status_ready_matrix_f0_1 => status_ready_matrix_f0_1,
350 -- status_ready_matrix_f0_1 => status_ready_matrix_f0_1,
349 status_ready_matrix_f1 => status_ready_matrix_f1,
351 status_ready_matrix_f1 => status_ready_matrix_f1,
350 status_ready_matrix_f2 => status_ready_matrix_f2,
352 status_ready_matrix_f2 => status_ready_matrix_f2,
351 -- status_error_anticipating_empty_fifo => status_error_anticipating_empty_fifo,
353 -- status_error_anticipating_empty_fifo => status_error_anticipating_empty_fifo,
352 -- status_error_bad_component_error => status_error_bad_component_error,
354 -- status_error_bad_component_error => status_error_bad_component_error,
353 config_active_interruption_onNewMatrix => config_active_interruption_onNewMatrix,
355 config_active_interruption_onNewMatrix => config_active_interruption_onNewMatrix,
354 config_active_interruption_onError => config_active_interruption_onError,
356 config_active_interruption_onError => config_active_interruption_onError,
355
357
356 matrix_time_f0 => matrix_time_f0,
358 matrix_time_f0 => matrix_time_f0,
357 -- matrix_time_f0_1 => matrix_time_f0_1,
359 -- matrix_time_f0_1 => matrix_time_f0_1,
358 matrix_time_f1 => matrix_time_f1,
360 matrix_time_f1 => matrix_time_f1,
359 matrix_time_f2 => matrix_time_f2,
361 matrix_time_f2 => matrix_time_f2,
360
362
361 addr_matrix_f0 => addr_matrix_f0,
363 addr_matrix_f0 => addr_matrix_f0,
362 -- addr_matrix_f0_1 => addr_matrix_f0_1,
364 -- addr_matrix_f0_1 => addr_matrix_f0_1,
363 addr_matrix_f1 => addr_matrix_f1,
365 addr_matrix_f1 => addr_matrix_f1,
364 addr_matrix_f2 => addr_matrix_f2,
366 addr_matrix_f2 => addr_matrix_f2,
365 -------------------------------------------------------------------------
367 -------------------------------------------------------------------------
366 status_full => status_full,
368 status_full => status_full,
367 status_full_ack => status_full_ack,
369 status_full_ack => status_full_ack,
368 status_full_err => status_full_err,
370 status_full_err => status_full_err,
369 status_new_err => status_new_err,
371 status_new_err => status_new_err,
370 data_shaping_BW => data_shaping_BW,
372 data_shaping_BW => data_shaping_BW,
371 data_shaping_SP0 => data_shaping_SP0,
373 data_shaping_SP0 => data_shaping_SP0,
372 data_shaping_SP1 => data_shaping_SP1,
374 data_shaping_SP1 => data_shaping_SP1,
373 data_shaping_R0 => data_shaping_R0,
375 data_shaping_R0 => data_shaping_R0,
374 data_shaping_R1 => data_shaping_R1,
376 data_shaping_R1 => data_shaping_R1,
375 delta_snapshot => delta_snapshot,
377 delta_snapshot => delta_snapshot,
376 delta_f0 => delta_f0,
378 delta_f0 => delta_f0,
377 delta_f0_2 => delta_f0_2,
379 delta_f0_2 => delta_f0_2,
378 delta_f1 => delta_f1,
380 delta_f1 => delta_f1,
379 delta_f2 => delta_f2,
381 delta_f2 => delta_f2,
380 nb_data_by_buffer => nb_data_by_buffer,
382 nb_data_by_buffer => nb_data_by_buffer,
381 nb_word_by_buffer => nb_word_by_buffer,
383 nb_word_by_buffer => nb_word_by_buffer,
382 nb_snapshot_param => nb_snapshot_param,
384 nb_snapshot_param => nb_snapshot_param,
383 enable_f0 => enable_f0,
385 enable_f0 => enable_f0,
384 enable_f1 => enable_f1,
386 enable_f1 => enable_f1,
385 enable_f2 => enable_f2,
387 enable_f2 => enable_f2,
386 enable_f3 => enable_f3,
388 enable_f3 => enable_f3,
387 burst_f0 => burst_f0,
389 burst_f0 => burst_f0,
388 burst_f1 => burst_f1,
390 burst_f1 => burst_f1,
389 burst_f2 => burst_f2,
391 burst_f2 => burst_f2,
390 run => run,
392 run => run,
391 addr_data_f0 => addr_data_f0,
393 addr_data_f0 => addr_data_f0,
392 addr_data_f1 => addr_data_f1,
394 addr_data_f1 => addr_data_f1,
393 addr_data_f2 => addr_data_f2,
395 addr_data_f2 => addr_data_f2,
394 addr_data_f3 => addr_data_f3,
396 addr_data_f3 => addr_data_f3,
395 start_date => start_date);
397 start_date => start_date);
396
398
397 -----------------------------------------------------------------------------
399 -----------------------------------------------------------------------------
398 -----------------------------------------------------------------------------
400 -----------------------------------------------------------------------------
399 lpp_waveform_1 : lpp_waveform
401 lpp_waveform_1 : lpp_waveform
400 GENERIC MAP (
402 GENERIC MAP (
401 tech => inferred,
403 tech => inferred,
402 data_size => 6*16,
404 data_size => 6*16,
403 nb_data_by_buffer_size => nb_data_by_buffer_size,
405 nb_data_by_buffer_size => nb_data_by_buffer_size,
404 nb_word_by_buffer_size => nb_word_by_buffer_size,
406 nb_word_by_buffer_size => nb_word_by_buffer_size,
405 nb_snapshot_param_size => nb_snapshot_param_size,
407 nb_snapshot_param_size => nb_snapshot_param_size,
406 delta_vector_size => delta_vector_size,
408 delta_vector_size => delta_vector_size,
407 delta_vector_size_f0_2 => delta_vector_size_f0_2
409 delta_vector_size_f0_2 => delta_vector_size_f0_2
408 )
410 )
409 PORT MAP (
411 PORT MAP (
410 clk => clk,
412 clk => clk,
411 rstn => rstn,
413 rstn => rstn,
412
414
413 reg_run => run,
415 reg_run => run,
414 reg_start_date => start_date,
416 reg_start_date => start_date,
415 reg_delta_snapshot => delta_snapshot,
417 reg_delta_snapshot => delta_snapshot,
416 reg_delta_f0 => delta_f0,
418 reg_delta_f0 => delta_f0,
417 reg_delta_f0_2 => delta_f0_2,
419 reg_delta_f0_2 => delta_f0_2,
418 reg_delta_f1 => delta_f1,
420 reg_delta_f1 => delta_f1,
419 reg_delta_f2 => delta_f2,
421 reg_delta_f2 => delta_f2,
420
422
421 enable_f0 => enable_f0,
423 enable_f0 => enable_f0,
422 enable_f1 => enable_f1,
424 enable_f1 => enable_f1,
423 enable_f2 => enable_f2,
425 enable_f2 => enable_f2,
424 enable_f3 => enable_f3,
426 enable_f3 => enable_f3,
425 burst_f0 => burst_f0,
427 burst_f0 => burst_f0,
426 burst_f1 => burst_f1,
428 burst_f1 => burst_f1,
427 burst_f2 => burst_f2,
429 burst_f2 => burst_f2,
428
430
429 nb_data_by_buffer => nb_data_by_buffer,
431 nb_data_by_buffer => nb_data_by_buffer,
430 nb_word_by_buffer => nb_word_by_buffer,
432 nb_word_by_buffer => nb_word_by_buffer,
431 nb_snapshot_param => nb_snapshot_param,
433 nb_snapshot_param => nb_snapshot_param,
432 status_full => status_full,
434 status_full => status_full,
433 status_full_ack => status_full_ack,
435 status_full_ack => status_full_ack,
434 status_full_err => status_full_err,
436 status_full_err => status_full_err,
435 status_new_err => status_new_err,
437 status_new_err => status_new_err,
436
438
437 coarse_time => coarse_time,
439 coarse_time => coarse_time,
438 fine_time => fine_time,
440 fine_time => fine_time,
439
441
440 --f0
442 --f0
441 addr_data_f0 => addr_data_f0,
443 addr_data_f0 => addr_data_f0,
442 data_f0_in_valid => sample_f0_val,
444 data_f0_in_valid => sample_f0_val,
443 data_f0_in => sample_f0_data,
445 data_f0_in => sample_f0_data,
444 --f1
446 --f1
445 addr_data_f1 => addr_data_f1,
447 addr_data_f1 => addr_data_f1,
446 data_f1_in_valid => sample_f1_val,
448 data_f1_in_valid => sample_f1_val,
447 data_f1_in => sample_f1_data,
449 data_f1_in => sample_f1_data,
448 --f2
450 --f2
449 addr_data_f2 => addr_data_f2,
451 addr_data_f2 => addr_data_f2,
450 data_f2_in_valid => sample_f2_val,
452 data_f2_in_valid => sample_f2_val,
451 data_f2_in => sample_f2_data,
453 data_f2_in => sample_f2_data,
452 --f3
454 --f3
453 addr_data_f3 => addr_data_f3,
455 addr_data_f3 => addr_data_f3,
454 data_f3_in_valid => sample_f3_val,
456 data_f3_in_valid => sample_f3_val,
455 data_f3_in => sample_f3_data,
457 data_f3_in => sample_f3_data,
456 -- OUTPUT -- DMA interface
458 -- OUTPUT -- DMA interface
457 --f0
459 --f0
458 data_f0_addr_out => data_f0_addr_out_s,
460 data_f0_addr_out => data_f0_addr_out_s,
459 data_f0_data_out => data_f0_data_out,
461 data_f0_data_out => data_f0_data_out,
460 data_f0_data_out_valid => data_f0_data_out_valid_s,
462 data_f0_data_out_valid => data_f0_data_out_valid_s,
461 data_f0_data_out_valid_burst => data_f0_data_out_valid_burst_s,
463 data_f0_data_out_valid_burst => data_f0_data_out_valid_burst_s,
462 data_f0_data_out_ren => data_f0_data_out_ren,
464 data_f0_data_out_ren => data_f0_data_out_ren,
463 --f1
465 --f1
464 data_f1_addr_out => data_f1_addr_out_s,
466 data_f1_addr_out => data_f1_addr_out_s,
465 data_f1_data_out => data_f1_data_out,
467 data_f1_data_out => data_f1_data_out,
466 data_f1_data_out_valid => data_f1_data_out_valid_s,
468 data_f1_data_out_valid => data_f1_data_out_valid_s,
467 data_f1_data_out_valid_burst => data_f1_data_out_valid_burst_s,
469 data_f1_data_out_valid_burst => data_f1_data_out_valid_burst_s,
468 data_f1_data_out_ren => data_f1_data_out_ren,
470 data_f1_data_out_ren => data_f1_data_out_ren,
469 --f2
471 --f2
470 data_f2_addr_out => data_f2_addr_out_s,
472 data_f2_addr_out => data_f2_addr_out_s,
471 data_f2_data_out => data_f2_data_out,
473 data_f2_data_out => data_f2_data_out,
472 data_f2_data_out_valid => data_f2_data_out_valid_s,
474 data_f2_data_out_valid => data_f2_data_out_valid_s,
473 data_f2_data_out_valid_burst => data_f2_data_out_valid_burst_s,
475 data_f2_data_out_valid_burst => data_f2_data_out_valid_burst_s,
474 data_f2_data_out_ren => data_f2_data_out_ren,
476 data_f2_data_out_ren => data_f2_data_out_ren,
475 --f3
477 --f3
476 data_f3_addr_out => data_f3_addr_out_s,
478 data_f3_addr_out => data_f3_addr_out_s,
477 data_f3_data_out => data_f3_data_out,
479 data_f3_data_out => data_f3_data_out,
478 data_f3_data_out_valid => data_f3_data_out_valid_s,
480 data_f3_data_out_valid => data_f3_data_out_valid_s,
479 data_f3_data_out_valid_burst => data_f3_data_out_valid_burst_s,
481 data_f3_data_out_valid_burst => data_f3_data_out_valid_burst_s,
480 data_f3_data_out_ren => data_f3_data_out_ren ,
482 data_f3_data_out_ren => data_f3_data_out_ren ,
481
483
482 -------------------------------------------------------------------------
484 -------------------------------------------------------------------------
483 observation_reg => OPEN
485 observation_reg => OPEN
484
486
485 );
487 );
486
488
487
489
488 -----------------------------------------------------------------------------
490 -----------------------------------------------------------------------------
489 -- TEMP
491 -- TEMP
490 -----------------------------------------------------------------------------
492 -----------------------------------------------------------------------------
491
493
492 PROCESS (clk, rstn)
494 PROCESS (clk, rstn)
493 BEGIN -- PROCESS
495 BEGIN -- PROCESS
494 IF rstn = '0' THEN -- asynchronous reset (active low)
496 IF rstn = '0' THEN -- asynchronous reset (active low)
495 data_f0_data_out_valid <= '0';
497 data_f0_data_out_valid <= '0';
496 data_f0_data_out_valid_burst <= '0';
498 data_f0_data_out_valid_burst <= '0';
497 data_f1_data_out_valid <= '0';
499 data_f1_data_out_valid <= '0';
498 data_f1_data_out_valid_burst <= '0';
500 data_f1_data_out_valid_burst <= '0';
499 data_f2_data_out_valid <= '0';
501 data_f2_data_out_valid <= '0';
500 data_f2_data_out_valid_burst <= '0';
502 data_f2_data_out_valid_burst <= '0';
501 data_f3_data_out_valid <= '0';
503 data_f3_data_out_valid <= '0';
502 data_f3_data_out_valid_burst <= '0';
504 data_f3_data_out_valid_burst <= '0';
503 ELSIF clk'EVENT AND clk = '1' THEN -- rising clock edge
505 ELSIF clk'EVENT AND clk = '1' THEN -- rising clock edge
504 data_f0_data_out_valid <= data_f0_data_out_valid_s;
506 data_f0_data_out_valid <= data_f0_data_out_valid_s;
505 data_f0_data_out_valid_burst <= data_f0_data_out_valid_burst_s;
507 data_f0_data_out_valid_burst <= data_f0_data_out_valid_burst_s;
506 data_f1_data_out_valid <= data_f1_data_out_valid_s;
508 data_f1_data_out_valid <= data_f1_data_out_valid_s;
507 data_f1_data_out_valid_burst <= data_f1_data_out_valid_burst_s;
509 data_f1_data_out_valid_burst <= data_f1_data_out_valid_burst_s;
508 data_f2_data_out_valid <= data_f2_data_out_valid_s;
510 data_f2_data_out_valid <= data_f2_data_out_valid_s;
509 data_f2_data_out_valid_burst <= data_f2_data_out_valid_burst_s;
511 data_f2_data_out_valid_burst <= data_f2_data_out_valid_burst_s;
510 data_f3_data_out_valid <= data_f3_data_out_valid_s;
512 data_f3_data_out_valid <= data_f3_data_out_valid_s;
511 data_f3_data_out_valid_burst <= data_f3_data_out_valid_burst_s;
513 data_f3_data_out_valid_burst <= data_f3_data_out_valid_burst_s;
512 END IF;
514 END IF;
513 END PROCESS;
515 END PROCESS;
514
516
515 data_f0_addr_out <= data_f0_addr_out_s;
517 data_f0_addr_out <= data_f0_addr_out_s;
516 data_f1_addr_out <= data_f1_addr_out_s;
518 data_f1_addr_out <= data_f1_addr_out_s;
517 data_f2_addr_out <= data_f2_addr_out_s;
519 data_f2_addr_out <= data_f2_addr_out_s;
518 data_f3_addr_out <= data_f3_addr_out_s;
520 data_f3_addr_out <= data_f3_addr_out_s;
519
521
520 -----------------------------------------------------------------------------
522 -----------------------------------------------------------------------------
521 -- RoundRobin Selection For DMA
523 -- RoundRobin Selection For DMA
522 -----------------------------------------------------------------------------
524 -----------------------------------------------------------------------------
523
525
524 dma_rr_valid(0) <= data_f0_data_out_valid OR data_f0_data_out_valid_burst;
526 dma_rr_valid(0) <= data_f0_data_out_valid OR data_f0_data_out_valid_burst;
525 dma_rr_valid(1) <= data_f1_data_out_valid OR data_f1_data_out_valid_burst;
527 dma_rr_valid(1) <= data_f1_data_out_valid OR data_f1_data_out_valid_burst;
526 dma_rr_valid(2) <= data_f2_data_out_valid OR data_f2_data_out_valid_burst;
528 dma_rr_valid(2) <= data_f2_data_out_valid OR data_f2_data_out_valid_burst;
527 dma_rr_valid(3) <= data_f3_data_out_valid OR data_f3_data_out_valid_burst;
529 dma_rr_valid(3) <= data_f3_data_out_valid OR data_f3_data_out_valid_burst;
528
530
529 RR_Arbiter_4_1 : RR_Arbiter_4
531 RR_Arbiter_4_1 : RR_Arbiter_4
530 PORT MAP (
532 PORT MAP (
531 clk => clk,
533 clk => clk,
532 rstn => rstn,
534 rstn => rstn,
533 in_valid => dma_rr_valid,
535 in_valid => dma_rr_valid,
534 out_grant => dma_rr_grant_s);
536 out_grant => dma_rr_grant_s);
535
537
536 dma_rr_valid_ms(0) <= data_ms_valid OR data_ms_valid_burst;
538 dma_rr_valid_ms(0) <= data_ms_valid OR data_ms_valid_burst;
537 dma_rr_valid_ms(1) <= '0' WHEN dma_rr_grant_s = "0000" ELSE '1';
539 dma_rr_valid_ms(1) <= '0' WHEN dma_rr_grant_s = "0000" ELSE '1';
538 dma_rr_valid_ms(2) <= '0';
540 dma_rr_valid_ms(2) <= '0';
539 dma_rr_valid_ms(3) <= '0';
541 dma_rr_valid_ms(3) <= '0';
540
542
541 RR_Arbiter_4_2 : RR_Arbiter_4
543 RR_Arbiter_4_2 : RR_Arbiter_4
542 PORT MAP (
544 PORT MAP (
543 clk => clk,
545 clk => clk,
544 rstn => rstn,
546 rstn => rstn,
545 in_valid => dma_rr_valid_ms,
547 in_valid => dma_rr_valid_ms,
546 out_grant => dma_rr_grant_ms);
548 out_grant => dma_rr_grant_ms);
547
549
548 dma_rr_grant <= dma_rr_grant_ms(0) & "0000" WHEN dma_rr_grant_ms(0) = '1' ELSE '0' & dma_rr_grant_s;
550 dma_rr_grant <= dma_rr_grant_ms(0) & "0000" WHEN dma_rr_grant_ms(0) = '1' ELSE '0' & dma_rr_grant_s;
549
551
550
552
551 -----------------------------------------------------------------------------
553 -----------------------------------------------------------------------------
552 -- in : dma_rr_grant
554 -- in : dma_rr_grant
553 -- send
555 -- send
554 -- out : dma_sel
556 -- out : dma_sel
555 -- dma_valid_burst
557 -- dma_valid_burst
556 -- dma_sel_valid
558 -- dma_sel_valid
557 -----------------------------------------------------------------------------
559 -----------------------------------------------------------------------------
558 PROCESS (clk, rstn)
560 PROCESS (clk, rstn)
559 BEGIN -- PROCESS
561 BEGIN -- PROCESS
560 IF rstn = '0' THEN -- asynchronous reset (active low)
562 IF rstn = '0' THEN -- asynchronous reset (active low)
561 dma_sel <= (OTHERS => '0');
563 dma_sel <= (OTHERS => '0');
562 dma_send <= '0';
564 dma_send <= '0';
563 dma_valid_burst <= '0';
565 dma_valid_burst <= '0';
564 data_ms_done <= '0';
566 data_ms_done <= '0';
565 ELSIF clk'EVENT AND clk = '1' THEN -- rising clock edge
567 ELSIF clk'EVENT AND clk = '1' THEN -- rising clock edge
566 IF run = '1' THEN
568 IF run = '1' THEN
567 data_ms_done <= '0';
569 data_ms_done <= '0';
568 IF dma_sel = "00000" OR dma_done = '1' THEN
570 IF dma_sel = "00000" OR dma_done = '1' THEN
569 dma_sel <= dma_rr_grant;
571 dma_sel <= dma_rr_grant;
570 IF dma_rr_grant(0) = '1' THEN
572 IF dma_rr_grant(0) = '1' THEN
571 dma_send <= '1';
573 dma_send <= '1';
572 dma_valid_burst <= data_f0_data_out_valid_burst;
574 dma_valid_burst <= data_f0_data_out_valid_burst;
573 dma_sel_valid <= data_f0_data_out_valid;
575 dma_sel_valid <= data_f0_data_out_valid;
574 ELSIF dma_rr_grant(1) = '1' THEN
576 ELSIF dma_rr_grant(1) = '1' THEN
575 dma_send <= '1';
577 dma_send <= '1';
576 dma_valid_burst <= data_f1_data_out_valid_burst;
578 dma_valid_burst <= data_f1_data_out_valid_burst;
577 dma_sel_valid <= data_f1_data_out_valid;
579 dma_sel_valid <= data_f1_data_out_valid;
578 ELSIF dma_rr_grant(2) = '1' THEN
580 ELSIF dma_rr_grant(2) = '1' THEN
579 dma_send <= '1';
581 dma_send <= '1';
580 dma_valid_burst <= data_f2_data_out_valid_burst;
582 dma_valid_burst <= data_f2_data_out_valid_burst;
581 dma_sel_valid <= data_f2_data_out_valid;
583 dma_sel_valid <= data_f2_data_out_valid;
582 ELSIF dma_rr_grant(3) = '1' THEN
584 ELSIF dma_rr_grant(3) = '1' THEN
583 dma_send <= '1';
585 dma_send <= '1';
584 dma_valid_burst <= data_f3_data_out_valid_burst;
586 dma_valid_burst <= data_f3_data_out_valid_burst;
585 dma_sel_valid <= data_f3_data_out_valid;
587 dma_sel_valid <= data_f3_data_out_valid;
586 ELSIF dma_rr_grant(4) = '1' THEN
588 ELSIF dma_rr_grant(4) = '1' THEN
587 dma_send <= '1';
589 dma_send <= '1';
588 dma_valid_burst <= data_ms_valid_burst;
590 dma_valid_burst <= data_ms_valid_burst;
589 dma_sel_valid <= data_ms_valid;
591 dma_sel_valid <= data_ms_valid;
590 END IF;
592 END IF;
591
593
592 IF dma_sel(4) = '1' THEN
594 IF dma_sel(4) = '1' THEN
593 data_ms_done <= '1';
595 data_ms_done <= '1';
594 END IF;
596 END IF;
595 ELSE
597 ELSE
596 dma_sel <= dma_sel;
598 dma_sel <= dma_sel;
597 dma_send <= '0';
599 dma_send <= '0';
598 END IF;
600 END IF;
599 ELSE
601 ELSE
600 data_ms_done <= '0';
602 data_ms_done <= '0';
601 dma_sel <= (OTHERS => '0');
603 dma_sel <= (OTHERS => '0');
602 dma_send <= '0';
604 dma_send <= '0';
603 dma_valid_burst <= '0';
605 dma_valid_burst <= '0';
604 END IF;
606 END IF;
605 END IF;
607 END IF;
606 END PROCESS;
608 END PROCESS;
607
609
608
610
609 dma_address <= data_f0_addr_out WHEN dma_sel(0) = '1' ELSE
611 dma_address <= data_f0_addr_out WHEN dma_sel(0) = '1' ELSE
610 data_f1_addr_out WHEN dma_sel(1) = '1' ELSE
612 data_f1_addr_out WHEN dma_sel(1) = '1' ELSE
611 data_f2_addr_out WHEN dma_sel(2) = '1' ELSE
613 data_f2_addr_out WHEN dma_sel(2) = '1' ELSE
612 data_f3_addr_out WHEN dma_sel(3) = '1' ELSE
614 data_f3_addr_out WHEN dma_sel(3) = '1' ELSE
613 data_ms_addr;
615 data_ms_addr;
614
616
615 dma_data <= data_f0_data_out WHEN dma_sel(0) = '1' ELSE
617 dma_data <= data_f0_data_out WHEN dma_sel(0) = '1' ELSE
616 data_f1_data_out WHEN dma_sel(1) = '1' ELSE
618 data_f1_data_out WHEN dma_sel(1) = '1' ELSE
617 data_f2_data_out WHEN dma_sel(2) = '1' ELSE
619 data_f2_data_out WHEN dma_sel(2) = '1' ELSE
618 data_f3_data_out WHEN dma_sel(3) = '1' ELSE
620 data_f3_data_out WHEN dma_sel(3) = '1' ELSE
619 data_ms_data;
621 data_ms_data;
620
622
621 data_f0_data_out_ren <= dma_ren WHEN dma_sel(0) = '1' ELSE '1';
623 data_f0_data_out_ren <= dma_ren WHEN dma_sel(0) = '1' ELSE '1';
622 data_f1_data_out_ren <= dma_ren WHEN dma_sel(1) = '1' ELSE '1';
624 data_f1_data_out_ren <= dma_ren WHEN dma_sel(1) = '1' ELSE '1';
623 data_f2_data_out_ren <= dma_ren WHEN dma_sel(2) = '1' ELSE '1';
625 data_f2_data_out_ren <= dma_ren WHEN dma_sel(2) = '1' ELSE '1';
624 data_f3_data_out_ren <= dma_ren WHEN dma_sel(3) = '1' ELSE '1';
626 data_f3_data_out_ren <= dma_ren WHEN dma_sel(3) = '1' ELSE '1';
625 data_ms_ren <= dma_ren WHEN dma_sel(4) = '1' ELSE '1';
627 data_ms_ren <= dma_ren WHEN dma_sel(4) = '1' ELSE '1';
626
628
627 dma_data_2 <= dma_data;
629 dma_data_2 <= dma_data;
628
630
629
631
630 -----------------------------------------------------------------------------
632 -----------------------------------------------------------------------------
631 -- DMA
633 -- DMA
632 -----------------------------------------------------------------------------
634 -----------------------------------------------------------------------------
633 lpp_dma_singleOrBurst_1 : lpp_dma_singleOrBurst
635 lpp_dma_singleOrBurst_1 : lpp_dma_singleOrBurst
634 GENERIC MAP (
636 GENERIC MAP (
635 tech => inferred,
637 tech => inferred,
636 hindex => hindex)
638 hindex => hindex)
637 PORT MAP (
639 PORT MAP (
638 HCLK => clk,
640 HCLK => clk,
639 HRESETn => rstn,
641 HRESETn => rstn,
640 run => run,
642 run => run,
641 AHB_Master_In => ahbi,
643 AHB_Master_In => ahbi,
642 AHB_Master_Out => ahbo,
644 AHB_Master_Out => ahbo,
643
645
644 send => dma_send,
646 send => dma_send,
645 valid_burst => dma_valid_burst,
647 valid_burst => dma_valid_burst,
646 done => dma_done,
648 done => dma_done,
647 ren => dma_ren,
649 ren => dma_ren,
648 address => dma_address,
650 address => dma_address,
649 data => dma_data_2);
651 data => dma_data_2);
650
652
651 -----------------------------------------------------------------------------
653 -----------------------------------------------------------------------------
652 -- Matrix Spectral
654 -- Matrix Spectral
653 -----------------------------------------------------------------------------
655 -----------------------------------------------------------------------------
654 sample_f0_wen <= NOT(sample_f0_val) & NOT(sample_f0_val) & NOT(sample_f0_val) &
656 sample_f0_wen <= NOT(sample_f0_val) & NOT(sample_f0_val) & NOT(sample_f0_val) &
655 NOT(sample_f0_val) & NOT(sample_f0_val);
657 NOT(sample_f0_val) & NOT(sample_f0_val);
656 sample_f1_wen <= NOT(sample_f1_val) & NOT(sample_f1_val) & NOT(sample_f1_val) &
658 sample_f1_wen <= NOT(sample_f1_val) & NOT(sample_f1_val) & NOT(sample_f1_val) &
657 NOT(sample_f1_val) & NOT(sample_f1_val);
659 NOT(sample_f1_val) & NOT(sample_f1_val);
658 sample_f3_wen <= NOT(sample_f3_val) & NOT(sample_f3_val) & NOT(sample_f3_val) &
660 sample_f3_wen <= NOT(sample_f3_val) & NOT(sample_f3_val) & NOT(sample_f3_val) &
659 NOT(sample_f3_val) & NOT(sample_f3_val);
661 NOT(sample_f3_val) & NOT(sample_f3_val);
660
662
661 sample_f0_wdata <= sample_f0_data((3*16)-1 DOWNTO (1*16)) & sample_f0_data((6*16)-1 DOWNTO (3*16)); -- (MSB) E2 E1 B2 B1 B0 (LSB)
663 sample_f0_wdata <= sample_f0_data((3*16)-1 DOWNTO (1*16)) & sample_f0_data((6*16)-1 DOWNTO (3*16)); -- (MSB) E2 E1 B2 B1 B0 (LSB)
662 sample_f1_wdata <= sample_f1_data((3*16)-1 DOWNTO (1*16)) & sample_f1_data((6*16)-1 DOWNTO (3*16));
664 sample_f1_wdata <= sample_f1_data((3*16)-1 DOWNTO (1*16)) & sample_f1_data((6*16)-1 DOWNTO (3*16));
663 sample_f3_wdata <= sample_f3_data((3*16)-1 DOWNTO (1*16)) & sample_f3_data((6*16)-1 DOWNTO (3*16));
665 sample_f3_wdata <= sample_f3_data((3*16)-1 DOWNTO (1*16)) & sample_f3_data((6*16)-1 DOWNTO (3*16));
664
666
665 -------------------------------------------------------------------------------
667 -------------------------------------------------------------------------------
666
668
667 ms_softandhard_rstn <= rstn AND run_ms AND run;
669 ms_softandhard_rstn <= rstn AND run_ms AND run;
668
670
669 -----------------------------------------------------------------------------
671 -----------------------------------------------------------------------------
670 lpp_lfr_ms_1 : lpp_lfr_ms
672 lpp_lfr_ms_1 : lpp_lfr_ms
671 GENERIC MAP (
673 GENERIC MAP (
672 Mem_use => Mem_use)
674 Mem_use => Mem_use)
673 PORT MAP (
675 PORT MAP (
674 clk => clk,
676 clk => clk,
675 rstn => ms_softandhard_rstn, --rstn,
677 rstn => ms_softandhard_rstn, --rstn,
676
678
677 coarse_time => coarse_time,
679 coarse_time => coarse_time,
678 fine_time => fine_time,
680 fine_time => fine_time,
679
681
680 sample_f0_wen => sample_f0_wen,
682 sample_f0_wen => sample_f0_wen,
681 sample_f0_wdata => sample_f0_wdata,
683 sample_f0_wdata => sample_f0_wdata,
682 sample_f1_wen => sample_f1_wen,
684 sample_f1_wen => sample_f1_wen,
683 sample_f1_wdata => sample_f1_wdata,
685 sample_f1_wdata => sample_f1_wdata,
684 sample_f2_wen => sample_f3_wen, -- TODO
686 sample_f2_wen => sample_f3_wen, -- TODO
685 sample_f2_wdata => sample_f3_wdata,-- TODO
687 sample_f2_wdata => sample_f3_wdata,-- TODO
686
688
687 dma_addr => data_ms_addr, --
689 dma_addr => data_ms_addr, --
688 dma_data => data_ms_data, --
690 dma_data => data_ms_data, --
689 dma_valid => data_ms_valid, --
691 dma_valid => data_ms_valid, --
690 dma_valid_burst => data_ms_valid_burst, --
692 dma_valid_burst => data_ms_valid_burst, --
691 dma_ren => data_ms_ren, --
693 dma_ren => data_ms_ren, --
692 dma_done => data_ms_done, --
694 dma_done => data_ms_done, --
693
695
694 ready_matrix_f0 => ready_matrix_f0,
696 ready_matrix_f0 => ready_matrix_f0,
695 ready_matrix_f1 => ready_matrix_f1,
697 ready_matrix_f1 => ready_matrix_f1,
696 ready_matrix_f2 => ready_matrix_f2,
698 ready_matrix_f2 => ready_matrix_f2,
697 error_bad_component_error => error_bad_component_error,
699 error_bad_component_error => error_bad_component_error,
698 error_buffer_full => error_buffer_full,
700 error_buffer_full => error_buffer_full,
699 error_input_fifo_write => error_input_fifo_write,
701 error_input_fifo_write => error_input_fifo_write,
700
702
701 debug_reg => observation_reg,
703 debug_reg => debug_ms,--observation_reg,
702
704
703 status_ready_matrix_f0 => status_ready_matrix_f0,
705 status_ready_matrix_f0 => status_ready_matrix_f0,
704 status_ready_matrix_f1 => status_ready_matrix_f1,
706 status_ready_matrix_f1 => status_ready_matrix_f1,
705 status_ready_matrix_f2 => status_ready_matrix_f2,
707 status_ready_matrix_f2 => status_ready_matrix_f2,
706 config_active_interruption_onNewMatrix => config_active_interruption_onNewMatrix,
708 config_active_interruption_onNewMatrix => config_active_interruption_onNewMatrix,
707 config_active_interruption_onError => config_active_interruption_onError,
709 config_active_interruption_onError => config_active_interruption_onError,
708 addr_matrix_f0 => addr_matrix_f0,
710 addr_matrix_f0 => addr_matrix_f0,
709 addr_matrix_f1 => addr_matrix_f1,
711 addr_matrix_f1 => addr_matrix_f1,
710 addr_matrix_f2 => addr_matrix_f2,
712 addr_matrix_f2 => addr_matrix_f2,
711
713
712 matrix_time_f0 => matrix_time_f0,
714 matrix_time_f0 => matrix_time_f0,
713 matrix_time_f1 => matrix_time_f1,
715 matrix_time_f1 => matrix_time_f1,
714 matrix_time_f2 => matrix_time_f2);
716 matrix_time_f2 => matrix_time_f2);
715
717
718 -----------------------------------------------------------------------------
719 observation_reg(31 DOWNTO 0) <= debug_ms(30 DOWNTO 0) & ms_softandhard_rstn;
720
721
716 END beh;
722 END beh;
@@ -1,683 +1,675
1 ------------------------------------------------------------------------------
1 ------------------------------------------------------------------------------
2 -- This file is a part of the LPP VHDL IP LIBRARY
2 -- This file is a part of the LPP VHDL IP LIBRARY
3 -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS
3 -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS
4 --
4 --
5 -- This program is free software; you can redistribute it and/or modify
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 3 of the License, or
7 -- the Free Software Foundation; either version 3 of the License, or
8 -- (at your option) any later version.
8 -- (at your option) any later version.
9 --
9 --
10 -- This program is distributed in the hope that it will be useful,
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
13 -- GNU General Public License for more details.
14 --
14 --
15 -- You should have received a copy of the GNU General Public License
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------
18 -------------------------------------------------------------------------------
19 -- Author : Jean-christophe Pellion
19 -- Author : Jean-christophe Pellion
20 -- Mail : jean-christophe.pellion@lpp.polytechnique.fr
20 -- Mail : jean-christophe.pellion@lpp.polytechnique.fr
21 -- jean-christophe.pellion@easii-ic.com
21 -- jean-christophe.pellion@easii-ic.com
22 ----------------------------------------------------------------------------
22 ----------------------------------------------------------------------------
23 LIBRARY ieee;
23 LIBRARY ieee;
24 USE ieee.std_logic_1164.ALL;
24 USE ieee.std_logic_1164.ALL;
25 USE ieee.numeric_std.ALL;
25 USE ieee.numeric_std.ALL;
26 LIBRARY grlib;
26 LIBRARY grlib;
27 USE grlib.amba.ALL;
27 USE grlib.amba.ALL;
28 USE grlib.stdlib.ALL;
28 USE grlib.stdlib.ALL;
29 USE grlib.devices.ALL;
29 USE grlib.devices.ALL;
30 LIBRARY lpp;
30 LIBRARY lpp;
31 USE lpp.lpp_lfr_pkg.ALL;
31 USE lpp.lpp_lfr_pkg.ALL;
32 USE lpp.lpp_amba.ALL;
32 --USE lpp.lpp_amba.ALL;
33 USE lpp.apb_devices_list.ALL;
33 USE lpp.apb_devices_list.ALL;
34 USE lpp.lpp_memory.ALL;
34 USE lpp.lpp_memory.ALL;
35 LIBRARY techmap;
35 LIBRARY techmap;
36 USE techmap.gencomp.ALL;
36 USE techmap.gencomp.ALL;
37
37
38 ENTITY lpp_lfr_apbreg IS
38 ENTITY lpp_lfr_apbreg IS
39 GENERIC (
39 GENERIC (
40 nb_data_by_buffer_size : INTEGER := 11;
40 nb_data_by_buffer_size : INTEGER := 11;
41 nb_word_by_buffer_size : INTEGER := 11;
41 nb_word_by_buffer_size : INTEGER := 11;
42 nb_snapshot_param_size : INTEGER := 11;
42 nb_snapshot_param_size : INTEGER := 11;
43 delta_vector_size : INTEGER := 20;
43 delta_vector_size : INTEGER := 20;
44 delta_vector_size_f0_2 : INTEGER := 3;
44 delta_vector_size_f0_2 : INTEGER := 3;
45
45
46 pindex : INTEGER := 4;
46 pindex : INTEGER := 4;
47 paddr : INTEGER := 4;
47 paddr : INTEGER := 4;
48 pmask : INTEGER := 16#fff#;
48 pmask : INTEGER := 16#fff#;
49 pirq_ms : INTEGER := 0;
49 pirq_ms : INTEGER := 0;
50 pirq_wfp : INTEGER := 1;
50 pirq_wfp : INTEGER := 1;
51 top_lfr_version : STD_LOGIC_VECTOR(23 DOWNTO 0) := X"000000");
51 top_lfr_version : STD_LOGIC_VECTOR(23 DOWNTO 0) := X"000000");
52 PORT (
52 PORT (
53 -- AMBA AHB system signals
53 -- AMBA AHB system signals
54 HCLK : IN STD_ULOGIC;
54 HCLK : IN STD_ULOGIC;
55 HRESETn : IN STD_ULOGIC;
55 HRESETn : IN STD_ULOGIC;
56
56
57 -- AMBA APB Slave Interface
57 -- AMBA APB Slave Interface
58 apbi : IN apb_slv_in_type;
58 apbi : IN apb_slv_in_type;
59 apbo : OUT apb_slv_out_type;
59 apbo : OUT apb_slv_out_type;
60
60
61 ---------------------------------------------------------------------------
61 ---------------------------------------------------------------------------
62 -- Spectral Matrix Reg
62 -- Spectral Matrix Reg
63 run_ms : OUT STD_LOGIC;
63 run_ms : OUT STD_LOGIC;
64 -- IN
64 -- IN
65 ready_matrix_f0 : IN STD_LOGIC;
65 ready_matrix_f0 : IN STD_LOGIC;
66 ready_matrix_f1 : IN STD_LOGIC;
66 ready_matrix_f1 : IN STD_LOGIC;
67 ready_matrix_f2 : IN STD_LOGIC;
67 ready_matrix_f2 : IN STD_LOGIC;
68
68
69 error_bad_component_error : IN STD_LOGIC;
69 error_bad_component_error : IN STD_LOGIC;
70 error_buffer_full : IN STD_LOGIC; -- TODO
70 error_buffer_full : IN STD_LOGIC; -- TODO
71 error_input_fifo_write : IN STD_LOGIC_VECTOR(2 DOWNTO 0); -- TODO
71 error_input_fifo_write : IN STD_LOGIC_VECTOR(2 DOWNTO 0); -- TODO
72
72
73 -- debug_reg : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
73 -- debug_reg : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
74
74
75 -- OUT
75 -- OUT
76 status_ready_matrix_f0 : OUT STD_LOGIC;
76 status_ready_matrix_f0 : OUT STD_LOGIC;
77 status_ready_matrix_f1 : OUT STD_LOGIC;
77 status_ready_matrix_f1 : OUT STD_LOGIC;
78 status_ready_matrix_f2 : OUT STD_LOGIC;
78 status_ready_matrix_f2 : OUT STD_LOGIC;
79
79
80 config_active_interruption_onNewMatrix : OUT STD_LOGIC;
80 config_active_interruption_onNewMatrix : OUT STD_LOGIC;
81 config_active_interruption_onError : OUT STD_LOGIC;
81 config_active_interruption_onError : OUT STD_LOGIC;
82
82
83 addr_matrix_f0 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
83 addr_matrix_f0 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
84 addr_matrix_f1 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
84 addr_matrix_f1 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
85 addr_matrix_f2 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
85 addr_matrix_f2 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
86
86
87 matrix_time_f0 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
87 matrix_time_f0 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
88 matrix_time_f1 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
88 matrix_time_f1 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
89 matrix_time_f2 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
89 matrix_time_f2 : IN STD_LOGIC_VECTOR(47 DOWNTO 0);
90
90
91 ---------------------------------------------------------------------------
91 ---------------------------------------------------------------------------
92 ---------------------------------------------------------------------------
92 ---------------------------------------------------------------------------
93 -- WaveForm picker Reg
93 -- WaveForm picker Reg
94 status_full : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
94 status_full : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
95 status_full_ack : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
95 status_full_ack : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
96 status_full_err : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
96 status_full_err : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
97 status_new_err : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
97 status_new_err : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
98
98
99 -- OUT
99 -- OUT
100 data_shaping_BW : OUT STD_LOGIC;
100 data_shaping_BW : OUT STD_LOGIC;
101 data_shaping_SP0 : OUT STD_LOGIC;
101 data_shaping_SP0 : OUT STD_LOGIC;
102 data_shaping_SP1 : OUT STD_LOGIC;
102 data_shaping_SP1 : OUT STD_LOGIC;
103 data_shaping_R0 : OUT STD_LOGIC;
103 data_shaping_R0 : OUT STD_LOGIC;
104 data_shaping_R1 : OUT STD_LOGIC;
104 data_shaping_R1 : OUT STD_LOGIC;
105
105
106 delta_snapshot : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
106 delta_snapshot : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
107 delta_f0 : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
107 delta_f0 : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
108 delta_f0_2 : OUT STD_LOGIC_VECTOR(delta_vector_size_f0_2-1 DOWNTO 0);
108 delta_f0_2 : OUT STD_LOGIC_VECTOR(delta_vector_size_f0_2-1 DOWNTO 0);
109 delta_f1 : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
109 delta_f1 : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
110 delta_f2 : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
110 delta_f2 : OUT STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
111 nb_data_by_buffer : OUT STD_LOGIC_VECTOR(nb_data_by_buffer_size-1 DOWNTO 0);
111 nb_data_by_buffer : OUT STD_LOGIC_VECTOR(nb_data_by_buffer_size-1 DOWNTO 0);
112 nb_word_by_buffer : OUT STD_LOGIC_VECTOR(nb_word_by_buffer_size-1 DOWNTO 0);
112 nb_word_by_buffer : OUT STD_LOGIC_VECTOR(nb_word_by_buffer_size-1 DOWNTO 0);
113 nb_snapshot_param : OUT STD_LOGIC_VECTOR(nb_snapshot_param_size-1 DOWNTO 0);
113 nb_snapshot_param : OUT STD_LOGIC_VECTOR(nb_snapshot_param_size-1 DOWNTO 0);
114
114
115 enable_f0 : OUT STD_LOGIC;
115 enable_f0 : OUT STD_LOGIC;
116 enable_f1 : OUT STD_LOGIC;
116 enable_f1 : OUT STD_LOGIC;
117 enable_f2 : OUT STD_LOGIC;
117 enable_f2 : OUT STD_LOGIC;
118 enable_f3 : OUT STD_LOGIC;
118 enable_f3 : OUT STD_LOGIC;
119
119
120 burst_f0 : OUT STD_LOGIC;
120 burst_f0 : OUT STD_LOGIC;
121 burst_f1 : OUT STD_LOGIC;
121 burst_f1 : OUT STD_LOGIC;
122 burst_f2 : OUT STD_LOGIC;
122 burst_f2 : OUT STD_LOGIC;
123
123
124 run : OUT STD_LOGIC;
124 run : OUT STD_LOGIC;
125
125
126 addr_data_f0 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
126 addr_data_f0 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
127 addr_data_f1 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
127 addr_data_f1 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
128 addr_data_f2 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
128 addr_data_f2 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
129 addr_data_f3 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
129 addr_data_f3 : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
130 start_date : OUT STD_LOGIC_VECTOR(30 DOWNTO 0)
130 start_date : OUT STD_LOGIC_VECTOR(30 DOWNTO 0)
131 ---------------------------------------------------------------------------
131 ---------------------------------------------------------------------------
132 );
132 );
133
133
134 END lpp_lfr_apbreg;
134 END lpp_lfr_apbreg;
135
135
136 ARCHITECTURE beh OF lpp_lfr_apbreg IS
136 ARCHITECTURE beh OF lpp_lfr_apbreg IS
137
137
138 CONSTANT REVISION : INTEGER := 1;
138 CONSTANT REVISION : INTEGER := 1;
139
139
140 CONSTANT pconfig : apb_config_type := (
140 CONSTANT pconfig : apb_config_type := (
141 0 => ahb_device_reg (VENDOR_LPP, LPP_LFR, 0, REVISION, pirq_wfp),
141 0 => ahb_device_reg (VENDOR_LPP, LPP_LFR, 0, REVISION, pirq_wfp),
142 1 => apb_iobar(paddr, pmask));
142 1 => apb_iobar(paddr, pmask));
143
143
144 TYPE lpp_SpectralMatrix_regs IS RECORD
144 TYPE lpp_SpectralMatrix_regs IS RECORD
145 config_active_interruption_onNewMatrix : STD_LOGIC;
145 config_active_interruption_onNewMatrix : STD_LOGIC;
146 config_active_interruption_onError : STD_LOGIC;
146 config_active_interruption_onError : STD_LOGIC;
147 config_ms_run : STD_LOGIC;
147 config_ms_run : STD_LOGIC;
148 status_ready_matrix_f0_0 : STD_LOGIC;
148 status_ready_matrix_f0_0 : STD_LOGIC;
149 status_ready_matrix_f1_0 : STD_LOGIC;
149 status_ready_matrix_f1_0 : STD_LOGIC;
150 status_ready_matrix_f2_0 : STD_LOGIC;
150 status_ready_matrix_f2_0 : STD_LOGIC;
151 status_ready_matrix_f0_1 : STD_LOGIC;
151 status_ready_matrix_f0_1 : STD_LOGIC;
152 status_ready_matrix_f1_1 : STD_LOGIC;
152 status_ready_matrix_f1_1 : STD_LOGIC;
153 status_ready_matrix_f2_1 : STD_LOGIC;
153 status_ready_matrix_f2_1 : STD_LOGIC;
154 status_error_bad_component_error : STD_LOGIC;
154 status_error_bad_component_error : STD_LOGIC;
155 status_error_buffer_full : STD_LOGIC;
155 status_error_buffer_full : STD_LOGIC;
156 status_error_input_fifo_write : STD_LOGIC_VECTOR(2 DOWNTO 0);
156 status_error_input_fifo_write : STD_LOGIC_VECTOR(2 DOWNTO 0);
157
157
158 addr_matrix_f0_0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
158 addr_matrix_f0_0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
159 addr_matrix_f0_1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
159 addr_matrix_f0_1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
160 addr_matrix_f1_0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
160 addr_matrix_f1_0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
161 addr_matrix_f1_1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
161 addr_matrix_f1_1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
162 addr_matrix_f2_0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
162 addr_matrix_f2_0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
163 addr_matrix_f2_1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
163 addr_matrix_f2_1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
164
164
165 time_matrix_f0_0 : STD_LOGIC_VECTOR(47 DOWNTO 0);
165 time_matrix_f0_0 : STD_LOGIC_VECTOR(47 DOWNTO 0);
166 time_matrix_f0_1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
166 time_matrix_f0_1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
167 time_matrix_f1_0 : STD_LOGIC_VECTOR(47 DOWNTO 0);
167 time_matrix_f1_0 : STD_LOGIC_VECTOR(47 DOWNTO 0);
168 time_matrix_f1_1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
168 time_matrix_f1_1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
169 time_matrix_f2_0 : STD_LOGIC_VECTOR(47 DOWNTO 0);
169 time_matrix_f2_0 : STD_LOGIC_VECTOR(47 DOWNTO 0);
170 time_matrix_f2_1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
170 time_matrix_f2_1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
171 END RECORD;
171 END RECORD;
172 SIGNAL reg_sp : lpp_SpectralMatrix_regs;
172 SIGNAL reg_sp : lpp_SpectralMatrix_regs;
173
173
174 TYPE lpp_WaveformPicker_regs IS RECORD
174 TYPE lpp_WaveformPicker_regs IS RECORD
175 status_full : STD_LOGIC_VECTOR(3 DOWNTO 0);
175 status_full : STD_LOGIC_VECTOR(3 DOWNTO 0);
176 status_full_err : STD_LOGIC_VECTOR(3 DOWNTO 0);
176 status_full_err : STD_LOGIC_VECTOR(3 DOWNTO 0);
177 status_new_err : STD_LOGIC_VECTOR(3 DOWNTO 0);
177 status_new_err : STD_LOGIC_VECTOR(3 DOWNTO 0);
178 data_shaping_BW : STD_LOGIC;
178 data_shaping_BW : STD_LOGIC;
179 data_shaping_SP0 : STD_LOGIC;
179 data_shaping_SP0 : STD_LOGIC;
180 data_shaping_SP1 : STD_LOGIC;
180 data_shaping_SP1 : STD_LOGIC;
181 data_shaping_R0 : STD_LOGIC;
181 data_shaping_R0 : STD_LOGIC;
182 data_shaping_R1 : STD_LOGIC;
182 data_shaping_R1 : STD_LOGIC;
183 delta_snapshot : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
183 delta_snapshot : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
184 delta_f0 : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
184 delta_f0 : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
185 delta_f0_2 : STD_LOGIC_VECTOR(delta_vector_size_f0_2-1 DOWNTO 0);
185 delta_f0_2 : STD_LOGIC_VECTOR(delta_vector_size_f0_2-1 DOWNTO 0);
186 delta_f1 : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
186 delta_f1 : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
187 delta_f2 : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
187 delta_f2 : STD_LOGIC_VECTOR(delta_vector_size-1 DOWNTO 0);
188 nb_data_by_buffer : STD_LOGIC_VECTOR(nb_data_by_buffer_size-1 DOWNTO 0);
188 nb_data_by_buffer : STD_LOGIC_VECTOR(nb_data_by_buffer_size-1 DOWNTO 0);
189 nb_word_by_buffer : STD_LOGIC_VECTOR(nb_word_by_buffer_size-1 DOWNTO 0);
189 nb_word_by_buffer : STD_LOGIC_VECTOR(nb_word_by_buffer_size-1 DOWNTO 0);
190 nb_snapshot_param : STD_LOGIC_VECTOR(nb_snapshot_param_size-1 DOWNTO 0);
190 nb_snapshot_param : STD_LOGIC_VECTOR(nb_snapshot_param_size-1 DOWNTO 0);
191 enable_f0 : STD_LOGIC;
191 enable_f0 : STD_LOGIC;
192 enable_f1 : STD_LOGIC;
192 enable_f1 : STD_LOGIC;
193 enable_f2 : STD_LOGIC;
193 enable_f2 : STD_LOGIC;
194 enable_f3 : STD_LOGIC;
194 enable_f3 : STD_LOGIC;
195 burst_f0 : STD_LOGIC;
195 burst_f0 : STD_LOGIC;
196 burst_f1 : STD_LOGIC;
196 burst_f1 : STD_LOGIC;
197 burst_f2 : STD_LOGIC;
197 burst_f2 : STD_LOGIC;
198 run : STD_LOGIC;
198 run : STD_LOGIC;
199 addr_data_f0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
199 addr_data_f0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
200 addr_data_f1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
200 addr_data_f1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
201 addr_data_f2 : STD_LOGIC_VECTOR(31 DOWNTO 0);
201 addr_data_f2 : STD_LOGIC_VECTOR(31 DOWNTO 0);
202 addr_data_f3 : STD_LOGIC_VECTOR(31 DOWNTO 0);
202 addr_data_f3 : STD_LOGIC_VECTOR(31 DOWNTO 0);
203 start_date : STD_LOGIC_VECTOR(30 DOWNTO 0);
203 start_date : STD_LOGIC_VECTOR(30 DOWNTO 0);
204 END RECORD;
204 END RECORD;
205 SIGNAL reg_wp : lpp_WaveformPicker_regs;
205 SIGNAL reg_wp : lpp_WaveformPicker_regs;
206
206
207 SIGNAL prdata : STD_LOGIC_VECTOR(31 DOWNTO 0);
207 SIGNAL prdata : STD_LOGIC_VECTOR(31 DOWNTO 0);
208
208
209 -----------------------------------------------------------------------------
209 -----------------------------------------------------------------------------
210 -- IRQ
210 -- IRQ
211 -----------------------------------------------------------------------------
211 -----------------------------------------------------------------------------
212 CONSTANT IRQ_WFP_SIZE : INTEGER := 12;
212 CONSTANT IRQ_WFP_SIZE : INTEGER := 12;
213 SIGNAL irq_wfp_ZERO : STD_LOGIC_VECTOR(IRQ_WFP_SIZE-1 DOWNTO 0);
213 SIGNAL irq_wfp_ZERO : STD_LOGIC_VECTOR(IRQ_WFP_SIZE-1 DOWNTO 0);
214 SIGNAL irq_wfp_reg_s : STD_LOGIC_VECTOR(IRQ_WFP_SIZE-1 DOWNTO 0);
214 SIGNAL irq_wfp_reg_s : STD_LOGIC_VECTOR(IRQ_WFP_SIZE-1 DOWNTO 0);
215 SIGNAL irq_wfp_reg : STD_LOGIC_VECTOR(IRQ_WFP_SIZE-1 DOWNTO 0);
215 SIGNAL irq_wfp_reg : STD_LOGIC_VECTOR(IRQ_WFP_SIZE-1 DOWNTO 0);
216 SIGNAL irq_wfp : STD_LOGIC_VECTOR(IRQ_WFP_SIZE-1 DOWNTO 0);
216 SIGNAL irq_wfp : STD_LOGIC_VECTOR(IRQ_WFP_SIZE-1 DOWNTO 0);
217 SIGNAL ored_irq_wfp : STD_LOGIC;
217 SIGNAL ored_irq_wfp : STD_LOGIC;
218
218
219 -----------------------------------------------------------------------------
219 -----------------------------------------------------------------------------
220 --
220 --
221 -----------------------------------------------------------------------------
221 -----------------------------------------------------------------------------
222 SIGNAL reg0_ready_matrix_f0 : STD_LOGIC;
222 SIGNAL reg0_ready_matrix_f0 : STD_LOGIC;
223 SIGNAL reg0_addr_matrix_f0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
223 SIGNAL reg0_addr_matrix_f0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
224 SIGNAL reg0_matrix_time_f0 : STD_LOGIC_VECTOR(47 DOWNTO 0);
224 SIGNAL reg0_matrix_time_f0 : STD_LOGIC_VECTOR(47 DOWNTO 0);
225
225
226 SIGNAL reg1_ready_matrix_f0 : STD_LOGIC;
226 SIGNAL reg1_ready_matrix_f0 : STD_LOGIC;
227 SIGNAL reg1_addr_matrix_f0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
227 SIGNAL reg1_addr_matrix_f0 : STD_LOGIC_VECTOR(31 DOWNTO 0);
228 SIGNAL reg1_matrix_time_f0 : STD_LOGIC_VECTOR(47 DOWNTO 0);
228 SIGNAL reg1_matrix_time_f0 : STD_LOGIC_VECTOR(47 DOWNTO 0);
229
229
230 SIGNAL reg0_ready_matrix_f1 : STD_LOGIC;
230 SIGNAL reg0_ready_matrix_f1 : STD_LOGIC;
231 SIGNAL reg0_addr_matrix_f1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
231 SIGNAL reg0_addr_matrix_f1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
232 SIGNAL reg0_matrix_time_f1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
232 SIGNAL reg0_matrix_time_f1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
233
233
234 SIGNAL reg1_ready_matrix_f1 : STD_LOGIC;
234 SIGNAL reg1_ready_matrix_f1 : STD_LOGIC;
235 SIGNAL reg1_addr_matrix_f1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
235 SIGNAL reg1_addr_matrix_f1 : STD_LOGIC_VECTOR(31 DOWNTO 0);
236 SIGNAL reg1_matrix_time_f1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
236 SIGNAL reg1_matrix_time_f1 : STD_LOGIC_VECTOR(47 DOWNTO 0);
237
237
238 SIGNAL reg0_ready_matrix_f2 : STD_LOGIC;
238 SIGNAL reg0_ready_matrix_f2 : STD_LOGIC;
239 SIGNAL reg0_addr_matrix_f2 : STD_LOGIC_VECTOR(31 DOWNTO 0);
239 SIGNAL reg0_addr_matrix_f2 : STD_LOGIC_VECTOR(31 DOWNTO 0);
240 SIGNAL reg0_matrix_time_f2 : STD_LOGIC_VECTOR(47 DOWNTO 0);
240 SIGNAL reg0_matrix_time_f2 : STD_LOGIC_VECTOR(47 DOWNTO 0);
241
241
242 SIGNAL reg1_ready_matrix_f2 : STD_LOGIC;
242 SIGNAL reg1_ready_matrix_f2 : STD_LOGIC;
243 SIGNAL reg1_addr_matrix_f2 : STD_LOGIC_VECTOR(31 DOWNTO 0);
243 SIGNAL reg1_addr_matrix_f2 : STD_LOGIC_VECTOR(31 DOWNTO 0);
244 SIGNAL reg1_matrix_time_f2 : STD_LOGIC_VECTOR(47 DOWNTO 0);
244 SIGNAL reg1_matrix_time_f2 : STD_LOGIC_VECTOR(47 DOWNTO 0);
245
245
246 BEGIN -- beh
246 BEGIN -- beh
247
247
248 -- status_ready_matrix_f0 <= reg_sp.status_ready_matrix_f0;
248 -- status_ready_matrix_f0 <= reg_sp.status_ready_matrix_f0;
249 -- status_ready_matrix_f1 <= reg_sp.status_ready_matrix_f1;
249 -- status_ready_matrix_f1 <= reg_sp.status_ready_matrix_f1;
250 -- status_ready_matrix_f2 <= reg_sp.status_ready_matrix_f2;
250 -- status_ready_matrix_f2 <= reg_sp.status_ready_matrix_f2;
251
251
252 config_active_interruption_onNewMatrix <= reg_sp.config_active_interruption_onNewMatrix;
252 config_active_interruption_onNewMatrix <= reg_sp.config_active_interruption_onNewMatrix;
253 config_active_interruption_onError <= reg_sp.config_active_interruption_onError;
253 config_active_interruption_onError <= reg_sp.config_active_interruption_onError;
254
254
255
255
256 -- addr_matrix_f0 <= reg_sp.addr_matrix_f0;
256 -- addr_matrix_f0 <= reg_sp.addr_matrix_f0;
257 -- addr_matrix_f1 <= reg_sp.addr_matrix_f1;
257 -- addr_matrix_f1 <= reg_sp.addr_matrix_f1;
258 -- addr_matrix_f2 <= reg_sp.addr_matrix_f2;
258 -- addr_matrix_f2 <= reg_sp.addr_matrix_f2;
259
259
260
260
261 data_shaping_BW <= NOT reg_wp.data_shaping_BW;
261 data_shaping_BW <= NOT reg_wp.data_shaping_BW;
262 data_shaping_SP0 <= reg_wp.data_shaping_SP0;
262 data_shaping_SP0 <= reg_wp.data_shaping_SP0;
263 data_shaping_SP1 <= reg_wp.data_shaping_SP1;
263 data_shaping_SP1 <= reg_wp.data_shaping_SP1;
264 data_shaping_R0 <= reg_wp.data_shaping_R0;
264 data_shaping_R0 <= reg_wp.data_shaping_R0;
265 data_shaping_R1 <= reg_wp.data_shaping_R1;
265 data_shaping_R1 <= reg_wp.data_shaping_R1;
266
266
267 delta_snapshot <= reg_wp.delta_snapshot;
267 delta_snapshot <= reg_wp.delta_snapshot;
268 delta_f0 <= reg_wp.delta_f0;
268 delta_f0 <= reg_wp.delta_f0;
269 delta_f0_2 <= reg_wp.delta_f0_2;
269 delta_f0_2 <= reg_wp.delta_f0_2;
270 delta_f1 <= reg_wp.delta_f1;
270 delta_f1 <= reg_wp.delta_f1;
271 delta_f2 <= reg_wp.delta_f2;
271 delta_f2 <= reg_wp.delta_f2;
272 nb_data_by_buffer <= reg_wp.nb_data_by_buffer;
272 nb_data_by_buffer <= reg_wp.nb_data_by_buffer;
273 nb_word_by_buffer <= reg_wp.nb_word_by_buffer;
273 nb_word_by_buffer <= reg_wp.nb_word_by_buffer;
274 nb_snapshot_param <= reg_wp.nb_snapshot_param;
274 nb_snapshot_param <= reg_wp.nb_snapshot_param;
275
275
276 enable_f0 <= reg_wp.enable_f0;
276 enable_f0 <= reg_wp.enable_f0;
277 enable_f1 <= reg_wp.enable_f1;
277 enable_f1 <= reg_wp.enable_f1;
278 enable_f2 <= reg_wp.enable_f2;
278 enable_f2 <= reg_wp.enable_f2;
279 enable_f3 <= reg_wp.enable_f3;
279 enable_f3 <= reg_wp.enable_f3;
280
280
281 burst_f0 <= reg_wp.burst_f0;
281 burst_f0 <= reg_wp.burst_f0;
282 burst_f1 <= reg_wp.burst_f1;
282 burst_f1 <= reg_wp.burst_f1;
283 burst_f2 <= reg_wp.burst_f2;
283 burst_f2 <= reg_wp.burst_f2;
284
284
285 run <= reg_wp.run;
285 run <= reg_wp.run;
286
286
287 addr_data_f0 <= reg_wp.addr_data_f0;
287 addr_data_f0 <= reg_wp.addr_data_f0;
288 addr_data_f1 <= reg_wp.addr_data_f1;
288 addr_data_f1 <= reg_wp.addr_data_f1;
289 addr_data_f2 <= reg_wp.addr_data_f2;
289 addr_data_f2 <= reg_wp.addr_data_f2;
290 addr_data_f3 <= reg_wp.addr_data_f3;
290 addr_data_f3 <= reg_wp.addr_data_f3;
291
291
292 start_date <= reg_wp.start_date;
292 start_date <= reg_wp.start_date;
293
293
294 lpp_lfr_apbreg : PROCESS (HCLK, HRESETn)
294 lpp_lfr_apbreg : PROCESS (HCLK, HRESETn)
295 VARIABLE paddr : STD_LOGIC_VECTOR(7 DOWNTO 2);
295 VARIABLE paddr : STD_LOGIC_VECTOR(7 DOWNTO 2);
296 BEGIN -- PROCESS lpp_dma_top
296 BEGIN -- PROCESS lpp_dma_top
297 IF HRESETn = '0' THEN -- asynchronous reset (active low)
297 IF HRESETn = '0' THEN -- asynchronous reset (active low)
298 reg_sp.config_active_interruption_onNewMatrix <= '0';
298 reg_sp.config_active_interruption_onNewMatrix <= '0';
299 reg_sp.config_active_interruption_onError <= '0';
299 reg_sp.config_active_interruption_onError <= '0';
300 reg_sp.config_ms_run <= '1';
300 reg_sp.config_ms_run <= '1';
301 reg_sp.status_ready_matrix_f0_0 <= '0';
301 reg_sp.status_ready_matrix_f0_0 <= '0';
302 reg_sp.status_ready_matrix_f1_0 <= '0';
302 reg_sp.status_ready_matrix_f1_0 <= '0';
303 reg_sp.status_ready_matrix_f2_0 <= '0';
303 reg_sp.status_ready_matrix_f2_0 <= '0';
304 reg_sp.status_ready_matrix_f0_1 <= '0';
304 reg_sp.status_ready_matrix_f0_1 <= '0';
305 reg_sp.status_ready_matrix_f1_1 <= '0';
305 reg_sp.status_ready_matrix_f1_1 <= '0';
306 reg_sp.status_ready_matrix_f2_1 <= '0';
306 reg_sp.status_ready_matrix_f2_1 <= '0';
307 reg_sp.status_error_bad_component_error <= '0';
307 reg_sp.status_error_bad_component_error <= '0';
308 reg_sp.status_error_buffer_full <= '0';
308 reg_sp.status_error_buffer_full <= '0';
309 reg_sp.status_error_input_fifo_write <= (OTHERS => '0');
309 reg_sp.status_error_input_fifo_write <= (OTHERS => '0');
310
310
311 reg_sp.addr_matrix_f0_0 <= (OTHERS => '0');
311 reg_sp.addr_matrix_f0_0 <= (OTHERS => '0');
312 reg_sp.addr_matrix_f1_0 <= (OTHERS => '0');
312 reg_sp.addr_matrix_f1_0 <= (OTHERS => '0');
313 reg_sp.addr_matrix_f2_0 <= (OTHERS => '0');
313 reg_sp.addr_matrix_f2_0 <= (OTHERS => '0');
314
314
315 reg_sp.addr_matrix_f0_1 <= (OTHERS => '0');
315 reg_sp.addr_matrix_f0_1 <= (OTHERS => '0');
316 reg_sp.addr_matrix_f1_1 <= (OTHERS => '0');
316 reg_sp.addr_matrix_f1_1 <= (OTHERS => '0');
317 reg_sp.addr_matrix_f2_1 <= (OTHERS => '0');
317 reg_sp.addr_matrix_f2_1 <= (OTHERS => '0');
318
318
319 reg_sp.time_matrix_f0_0 <= (OTHERS => '0'); -- ok
319 -- reg_sp.time_matrix_f0_0 <= (OTHERS => '0'); -- ok
320 reg_sp.time_matrix_f1_0 <= (OTHERS => '0'); -- ok
320 -- reg_sp.time_matrix_f1_0 <= (OTHERS => '0'); -- ok
321 reg_sp.time_matrix_f2_0 <= (OTHERS => '0'); -- ok
321 -- reg_sp.time_matrix_f2_0 <= (OTHERS => '0'); -- ok
322
322
323 reg_sp.time_matrix_f0_1 <= (OTHERS => '0'); -- ok
323 -- reg_sp.time_matrix_f0_1 <= (OTHERS => '0'); -- ok
324 reg_sp.time_matrix_f1_1 <= (OTHERS => '0'); -- ok
324 --reg_sp.time_matrix_f1_1 <= (OTHERS => '0'); -- ok
325 reg_sp.time_matrix_f2_1 <= (OTHERS => '0'); -- ok
325 -- reg_sp.time_matrix_f2_1 <= (OTHERS => '0'); -- ok
326
326
327 prdata <= (OTHERS => '0');
327 prdata <= (OTHERS => '0');
328
328
329 apbo.pirq <= (OTHERS => '0');
329 apbo.pirq <= (OTHERS => '0');
330
330
331 status_full_ack <= (OTHERS => '0');
331 status_full_ack <= (OTHERS => '0');
332
332
333 reg_wp.data_shaping_BW <= '0';
333 reg_wp.data_shaping_BW <= '0';
334 reg_wp.data_shaping_SP0 <= '0';
334 reg_wp.data_shaping_SP0 <= '0';
335 reg_wp.data_shaping_SP1 <= '0';
335 reg_wp.data_shaping_SP1 <= '0';
336 reg_wp.data_shaping_R0 <= '0';
336 reg_wp.data_shaping_R0 <= '0';
337 reg_wp.data_shaping_R1 <= '0';
337 reg_wp.data_shaping_R1 <= '0';
338 reg_wp.enable_f0 <= '0';
338 reg_wp.enable_f0 <= '0';
339 reg_wp.enable_f1 <= '0';
339 reg_wp.enable_f1 <= '0';
340 reg_wp.enable_f2 <= '0';
340 reg_wp.enable_f2 <= '0';
341 reg_wp.enable_f3 <= '0';
341 reg_wp.enable_f3 <= '0';
342 reg_wp.burst_f0 <= '0';
342 reg_wp.burst_f0 <= '0';
343 reg_wp.burst_f1 <= '0';
343 reg_wp.burst_f1 <= '0';
344 reg_wp.burst_f2 <= '0';
344 reg_wp.burst_f2 <= '0';
345 reg_wp.run <= '0';
345 reg_wp.run <= '0';
346 reg_wp.addr_data_f0 <= (OTHERS => '0');
346 reg_wp.addr_data_f0 <= (OTHERS => '0');
347 reg_wp.addr_data_f1 <= (OTHERS => '0');
347 reg_wp.addr_data_f1 <= (OTHERS => '0');
348 reg_wp.addr_data_f2 <= (OTHERS => '0');
348 reg_wp.addr_data_f2 <= (OTHERS => '0');
349 reg_wp.addr_data_f3 <= (OTHERS => '0');
349 reg_wp.addr_data_f3 <= (OTHERS => '0');
350 reg_wp.status_full <= (OTHERS => '0');
350 reg_wp.status_full <= (OTHERS => '0');
351 reg_wp.status_full_err <= (OTHERS => '0');
351 reg_wp.status_full_err <= (OTHERS => '0');
352 reg_wp.status_new_err <= (OTHERS => '0');
352 reg_wp.status_new_err <= (OTHERS => '0');
353 reg_wp.delta_snapshot <= (OTHERS => '0');
353 reg_wp.delta_snapshot <= (OTHERS => '0');
354 reg_wp.delta_f0 <= (OTHERS => '0');
354 reg_wp.delta_f0 <= (OTHERS => '0');
355 reg_wp.delta_f0_2 <= (OTHERS => '0');
355 reg_wp.delta_f0_2 <= (OTHERS => '0');
356 reg_wp.delta_f1 <= (OTHERS => '0');
356 reg_wp.delta_f1 <= (OTHERS => '0');
357 reg_wp.delta_f2 <= (OTHERS => '0');
357 reg_wp.delta_f2 <= (OTHERS => '0');
358 reg_wp.nb_data_by_buffer <= (OTHERS => '0');
358 reg_wp.nb_data_by_buffer <= (OTHERS => '0');
359 reg_wp.nb_snapshot_param <= (OTHERS => '0');
359 reg_wp.nb_snapshot_param <= (OTHERS => '0');
360 reg_wp.start_date <= (OTHERS => '0');
360 reg_wp.start_date <= (OTHERS => '0');
361
361
362 ELSIF HCLK'EVENT AND HCLK = '1' THEN -- rising clock edge
362 ELSIF HCLK'EVENT AND HCLK = '1' THEN -- rising clock edge
363
364 reg_sp.time_matrix_f0_0 <= reg0_matrix_time_f0; -- ok
365 reg_sp.time_matrix_f1_0 <= reg0_matrix_time_f1; -- ok
366 reg_sp.time_matrix_f2_0 <= reg0_matrix_time_f2; -- ok
367
368 reg_sp.time_matrix_f0_1 <= reg1_matrix_time_f0; -- ok
369 reg_sp.time_matrix_f1_1 <= reg1_matrix_time_f1; -- ok
370 reg_sp.time_matrix_f2_1 <= reg1_matrix_time_f2; -- ok
371
363
372 status_full_ack <= (OTHERS => '0');
364 status_full_ack <= (OTHERS => '0');
373
365
374 reg_sp.status_ready_matrix_f0_0 <= reg_sp.status_ready_matrix_f0_0 OR reg0_ready_matrix_f0;
366 reg_sp.status_ready_matrix_f0_0 <= reg_sp.status_ready_matrix_f0_0 OR reg0_ready_matrix_f0;
375 reg_sp.status_ready_matrix_f1_0 <= reg_sp.status_ready_matrix_f1_0 OR reg0_ready_matrix_f1;
367 reg_sp.status_ready_matrix_f1_0 <= reg_sp.status_ready_matrix_f1_0 OR reg0_ready_matrix_f1;
376 reg_sp.status_ready_matrix_f2_0 <= reg_sp.status_ready_matrix_f2_0 OR reg0_ready_matrix_f2;
368 reg_sp.status_ready_matrix_f2_0 <= reg_sp.status_ready_matrix_f2_0 OR reg0_ready_matrix_f2;
377
369
378 reg_sp.status_ready_matrix_f0_1 <= reg_sp.status_ready_matrix_f0_1 OR reg1_ready_matrix_f0;
370 reg_sp.status_ready_matrix_f0_1 <= reg_sp.status_ready_matrix_f0_1 OR reg1_ready_matrix_f0;
379 reg_sp.status_ready_matrix_f1_1 <= reg_sp.status_ready_matrix_f1_1 OR reg1_ready_matrix_f1;
371 reg_sp.status_ready_matrix_f1_1 <= reg_sp.status_ready_matrix_f1_1 OR reg1_ready_matrix_f1;
380 reg_sp.status_ready_matrix_f2_1 <= reg_sp.status_ready_matrix_f2_1 OR reg1_ready_matrix_f2;
372 reg_sp.status_ready_matrix_f2_1 <= reg_sp.status_ready_matrix_f2_1 OR reg1_ready_matrix_f2;
381
373
382 reg_sp.status_error_bad_component_error <= reg_sp.status_error_bad_component_error OR error_bad_component_error;
374 reg_sp.status_error_bad_component_error <= reg_sp.status_error_bad_component_error OR error_bad_component_error;
383
375
384 reg_sp.status_error_buffer_full <= reg_sp.status_error_buffer_full OR error_buffer_full;
376 reg_sp.status_error_buffer_full <= reg_sp.status_error_buffer_full OR error_buffer_full;
385 reg_sp.status_error_input_fifo_write(0) <= reg_sp.status_error_input_fifo_write(0) OR error_input_fifo_write(0);
377 reg_sp.status_error_input_fifo_write(0) <= reg_sp.status_error_input_fifo_write(0) OR error_input_fifo_write(0);
386 reg_sp.status_error_input_fifo_write(1) <= reg_sp.status_error_input_fifo_write(1) OR error_input_fifo_write(1);
378 reg_sp.status_error_input_fifo_write(1) <= reg_sp.status_error_input_fifo_write(1) OR error_input_fifo_write(1);
387 reg_sp.status_error_input_fifo_write(2) <= reg_sp.status_error_input_fifo_write(2) OR error_input_fifo_write(2);
379 reg_sp.status_error_input_fifo_write(2) <= reg_sp.status_error_input_fifo_write(2) OR error_input_fifo_write(2);
388
380
389
381
390
382
391 all_status : FOR I IN 3 DOWNTO 0 LOOP
383 all_status : FOR I IN 3 DOWNTO 0 LOOP
392 reg_wp.status_full(I) <= status_full(I) AND reg_wp.run;
384 reg_wp.status_full(I) <= status_full(I) AND reg_wp.run;
393 reg_wp.status_full_err(I) <= status_full_err(I) AND reg_wp.run;
385 reg_wp.status_full_err(I) <= status_full_err(I) AND reg_wp.run;
394 reg_wp.status_new_err(I) <= status_new_err(I) AND reg_wp.run;
386 reg_wp.status_new_err(I) <= status_new_err(I) AND reg_wp.run;
395 END LOOP all_status;
387 END LOOP all_status;
396
388
397 paddr := "000000";
389 paddr := "000000";
398 paddr(7 DOWNTO 2) := apbi.paddr(7 DOWNTO 2);
390 paddr(7 DOWNTO 2) := apbi.paddr(7 DOWNTO 2);
399 prdata <= (OTHERS => '0');
391 prdata <= (OTHERS => '0');
400 IF apbi.psel(pindex) = '1' THEN
392 IF apbi.psel(pindex) = '1' THEN
401 -- APB DMA READ --
393 -- APB DMA READ --
402 CASE paddr(7 DOWNTO 2) IS
394 CASE paddr(7 DOWNTO 2) IS
403 --0
395 --0
404 WHEN "000000" => prdata(0) <= reg_sp.config_active_interruption_onNewMatrix;
396 WHEN "000000" => prdata(0) <= reg_sp.config_active_interruption_onNewMatrix;
405 prdata(1) <= reg_sp.config_active_interruption_onError;
397 prdata(1) <= reg_sp.config_active_interruption_onError;
406 prdata(2) <= reg_sp.config_ms_run;
398 prdata(2) <= reg_sp.config_ms_run;
407 --1
399 --1
408 WHEN "000001" => prdata(0) <= reg_sp.status_ready_matrix_f0_0;
400 WHEN "000001" => prdata(0) <= reg_sp.status_ready_matrix_f0_0;
409 prdata(1) <= reg_sp.status_ready_matrix_f0_1;
401 prdata(1) <= reg_sp.status_ready_matrix_f0_1;
410 prdata(2) <= reg_sp.status_ready_matrix_f1_0;
402 prdata(2) <= reg_sp.status_ready_matrix_f1_0;
411 prdata(3) <= reg_sp.status_ready_matrix_f1_1;
403 prdata(3) <= reg_sp.status_ready_matrix_f1_1;
412 prdata(4) <= reg_sp.status_ready_matrix_f2_0;
404 prdata(4) <= reg_sp.status_ready_matrix_f2_0;
413 prdata(5) <= reg_sp.status_ready_matrix_f2_1;
405 prdata(5) <= reg_sp.status_ready_matrix_f2_1;
414 prdata(6) <= reg_sp.status_error_bad_component_error;
406 prdata(6) <= reg_sp.status_error_bad_component_error;
415 prdata(7) <= reg_sp.status_error_buffer_full;
407 prdata(7) <= reg_sp.status_error_buffer_full;
416 prdata(8) <= reg_sp.status_error_input_fifo_write(0);
408 prdata(8) <= reg_sp.status_error_input_fifo_write(0);
417 prdata(9) <= reg_sp.status_error_input_fifo_write(1);
409 prdata(9) <= reg_sp.status_error_input_fifo_write(1);
418 prdata(10) <= reg_sp.status_error_input_fifo_write(2);
410 prdata(10) <= reg_sp.status_error_input_fifo_write(2);
419 --2
411 --2
420 WHEN "000010" => prdata <= reg_sp.addr_matrix_f0_0;
412 WHEN "000010" => prdata <= reg_sp.addr_matrix_f0_0;
421 --3
413 --3
422 WHEN "000011" => prdata <= reg_sp.addr_matrix_f0_1;
414 WHEN "000011" => prdata <= reg_sp.addr_matrix_f0_1;
423 --4
415 --4
424 WHEN "000100" => prdata <= reg_sp.addr_matrix_f1_0;
416 WHEN "000100" => prdata <= reg_sp.addr_matrix_f1_0;
425 --5
417 --5
426 WHEN "000101" => prdata <= reg_sp.addr_matrix_f1_1;
418 WHEN "000101" => prdata <= reg_sp.addr_matrix_f1_1;
427 --6
419 --6
428 WHEN "000110" => prdata <= reg_sp.addr_matrix_f2_0;
420 WHEN "000110" => prdata <= reg_sp.addr_matrix_f2_0;
429 --7
421 --7
430 WHEN "000111" => prdata <= reg_sp.addr_matrix_f2_1;
422 WHEN "000111" => prdata <= reg_sp.addr_matrix_f2_1;
431 --8
423 --8
432 WHEN "001000" => prdata <= reg_sp.time_matrix_f0_0(47 DOWNTO 16);
424 WHEN "001000" => prdata <= reg_sp.time_matrix_f0_0(47 DOWNTO 16);
433 --9
425 --9
434 WHEN "001001" => prdata(15 DOWNTO 0) <= reg_sp.time_matrix_f0_0(15 DOWNTO 0);
426 WHEN "001001" => prdata(15 DOWNTO 0) <= reg_sp.time_matrix_f0_0(15 DOWNTO 0);
435 --10
427 --10
436 WHEN "001010" => prdata <= reg_sp.time_matrix_f0_1(47 DOWNTO 16);
428 WHEN "001010" => prdata <= reg_sp.time_matrix_f0_1(47 DOWNTO 16);
437 --11
429 --11
438 WHEN "001011" => prdata(15 DOWNTO 0) <= reg_sp.time_matrix_f0_1(15 DOWNTO 0);
430 WHEN "001011" => prdata(15 DOWNTO 0) <= reg_sp.time_matrix_f0_1(15 DOWNTO 0);
439 --12
431 --12
440 WHEN "001100" => prdata <= reg_sp.time_matrix_f1_0(47 DOWNTO 16);
432 WHEN "001100" => prdata <= reg_sp.time_matrix_f1_0(47 DOWNTO 16);
441 --13
433 --13
442 WHEN "001101" => prdata(15 DOWNTO 0) <= reg_sp.time_matrix_f1_0(15 DOWNTO 0);
434 WHEN "001101" => prdata(15 DOWNTO 0) <= reg_sp.time_matrix_f1_0(15 DOWNTO 0);
443 --14
435 --14
444 WHEN "001110" => prdata <= reg_sp.time_matrix_f1_1(47 DOWNTO 16);
436 WHEN "001110" => prdata <= reg_sp.time_matrix_f1_1(47 DOWNTO 16);
445 --15
437 --15
446 WHEN "001111" => prdata(15 DOWNTO 0) <= reg_sp.time_matrix_f1_1(15 DOWNTO 0);
438 WHEN "001111" => prdata(15 DOWNTO 0) <= reg_sp.time_matrix_f1_1(15 DOWNTO 0);
447 --16
439 --16
448 WHEN "010000" => prdata <= reg_sp.time_matrix_f2_0(47 DOWNTO 16);
440 WHEN "010000" => prdata <= reg_sp.time_matrix_f2_0(47 DOWNTO 16);
449 --17
441 --17
450 WHEN "010001" => prdata(15 DOWNTO 0) <= reg_sp.time_matrix_f2_0(15 DOWNTO 0);
442 WHEN "010001" => prdata(15 DOWNTO 0) <= reg_sp.time_matrix_f2_0(15 DOWNTO 0);
451 --18
443 --18
452 WHEN "010010" => prdata <= reg_sp.time_matrix_f2_1(47 DOWNTO 16);
444 WHEN "010010" => prdata <= reg_sp.time_matrix_f2_1(47 DOWNTO 16);
453 --19
445 --19
454 WHEN "010011" => prdata(15 DOWNTO 0) <= reg_sp.time_matrix_f2_1(15 DOWNTO 0);
446 WHEN "010011" => prdata(15 DOWNTO 0) <= reg_sp.time_matrix_f2_1(15 DOWNTO 0);
455 ---------------------------------------------------------------------
447 ---------------------------------------------------------------------
456 --20
448 --20
457 WHEN "010100" => prdata(0) <= reg_wp.data_shaping_BW;
449 WHEN "010100" => prdata(0) <= reg_wp.data_shaping_BW;
458 prdata(1) <= reg_wp.data_shaping_SP0;
450 prdata(1) <= reg_wp.data_shaping_SP0;
459 prdata(2) <= reg_wp.data_shaping_SP1;
451 prdata(2) <= reg_wp.data_shaping_SP1;
460 prdata(3) <= reg_wp.data_shaping_R0;
452 prdata(3) <= reg_wp.data_shaping_R0;
461 prdata(4) <= reg_wp.data_shaping_R1;
453 prdata(4) <= reg_wp.data_shaping_R1;
462 --21
454 --21
463 WHEN "010101" => prdata(0) <= reg_wp.enable_f0;
455 WHEN "010101" => prdata(0) <= reg_wp.enable_f0;
464 prdata(1) <= reg_wp.enable_f1;
456 prdata(1) <= reg_wp.enable_f1;
465 prdata(2) <= reg_wp.enable_f2;
457 prdata(2) <= reg_wp.enable_f2;
466 prdata(3) <= reg_wp.enable_f3;
458 prdata(3) <= reg_wp.enable_f3;
467 prdata(4) <= reg_wp.burst_f0;
459 prdata(4) <= reg_wp.burst_f0;
468 prdata(5) <= reg_wp.burst_f1;
460 prdata(5) <= reg_wp.burst_f1;
469 prdata(6) <= reg_wp.burst_f2;
461 prdata(6) <= reg_wp.burst_f2;
470 prdata(7) <= reg_wp.run;
462 prdata(7) <= reg_wp.run;
471 --22
463 --22
472 WHEN "010110" => prdata <= reg_wp.addr_data_f0;
464 WHEN "010110" => prdata <= reg_wp.addr_data_f0;
473 --23
465 --23
474 WHEN "010111" => prdata <= reg_wp.addr_data_f1;
466 WHEN "010111" => prdata <= reg_wp.addr_data_f1;
475 --24
467 --24
476 WHEN "011000" => prdata <= reg_wp.addr_data_f2;
468 WHEN "011000" => prdata <= reg_wp.addr_data_f2;
477 --25
469 --25
478 WHEN "011001" => prdata <= reg_wp.addr_data_f3;
470 WHEN "011001" => prdata <= reg_wp.addr_data_f3;
479 --26
471 --26
480 WHEN "011010" => prdata(3 DOWNTO 0) <= reg_wp.status_full;
472 WHEN "011010" => prdata(3 DOWNTO 0) <= reg_wp.status_full;
481 prdata(7 DOWNTO 4) <= reg_wp.status_full_err;
473 prdata(7 DOWNTO 4) <= reg_wp.status_full_err;
482 prdata(11 DOWNTO 8) <= reg_wp.status_new_err;
474 prdata(11 DOWNTO 8) <= reg_wp.status_new_err;
483 --27
475 --27
484 WHEN "011011" => prdata(delta_vector_size-1 DOWNTO 0) <= reg_wp.delta_snapshot;
476 WHEN "011011" => prdata(delta_vector_size-1 DOWNTO 0) <= reg_wp.delta_snapshot;
485 --28
477 --28
486 WHEN "011100" => prdata(delta_vector_size-1 DOWNTO 0) <= reg_wp.delta_f0;
478 WHEN "011100" => prdata(delta_vector_size-1 DOWNTO 0) <= reg_wp.delta_f0;
487 --29
479 --29
488 WHEN "011101" => prdata(delta_vector_size_f0_2-1 DOWNTO 0) <= reg_wp.delta_f0_2;
480 WHEN "011101" => prdata(delta_vector_size_f0_2-1 DOWNTO 0) <= reg_wp.delta_f0_2;
489 --30
481 --30
490 WHEN "011110" => prdata(delta_vector_size-1 DOWNTO 0) <= reg_wp.delta_f1;
482 WHEN "011110" => prdata(delta_vector_size-1 DOWNTO 0) <= reg_wp.delta_f1;
491 --31
483 --31
492 WHEN "011111" => prdata(delta_vector_size-1 DOWNTO 0) <= reg_wp.delta_f2;
484 WHEN "011111" => prdata(delta_vector_size-1 DOWNTO 0) <= reg_wp.delta_f2;
493 --32
485 --32
494 WHEN "100000" => prdata(nb_data_by_buffer_size-1 DOWNTO 0) <= reg_wp.nb_data_by_buffer;
486 WHEN "100000" => prdata(nb_data_by_buffer_size-1 DOWNTO 0) <= reg_wp.nb_data_by_buffer;
495 --33
487 --33
496 WHEN "100001" => prdata(nb_snapshot_param_size-1 DOWNTO 0) <= reg_wp.nb_snapshot_param;
488 WHEN "100001" => prdata(nb_snapshot_param_size-1 DOWNTO 0) <= reg_wp.nb_snapshot_param;
497 --34
489 --34
498 WHEN "100010" => prdata(30 DOWNTO 0) <= reg_wp.start_date;
490 WHEN "100010" => prdata(30 DOWNTO 0) <= reg_wp.start_date;
499 --35
491 --35
500 WHEN "100011" => prdata(nb_word_by_buffer_size-1 DOWNTO 0) <= reg_wp.nb_word_by_buffer;
492 WHEN "100011" => prdata(nb_word_by_buffer_size-1 DOWNTO 0) <= reg_wp.nb_word_by_buffer;
501 ----------------------------------------------------
493 ----------------------------------------------------
502 WHEN "111100" => prdata(23 DOWNTO 0) <= top_lfr_version(23 DOWNTO 0);
494 WHEN "111100" => prdata(23 DOWNTO 0) <= top_lfr_version(23 DOWNTO 0);
503 WHEN OTHERS => NULL;
495 WHEN OTHERS => NULL;
504
496
505 END CASE;
497 END CASE;
506 IF (apbi.pwrite AND apbi.penable) = '1' THEN
498 IF (apbi.pwrite AND apbi.penable) = '1' THEN
507 -- APB DMA WRITE --
499 -- APB DMA WRITE --
508 CASE paddr(7 DOWNTO 2) IS
500 CASE paddr(7 DOWNTO 2) IS
509 --
501 --
510 WHEN "000000" => reg_sp.config_active_interruption_onNewMatrix <= apbi.pwdata(0);
502 WHEN "000000" => reg_sp.config_active_interruption_onNewMatrix <= apbi.pwdata(0);
511 reg_sp.config_active_interruption_onError <= apbi.pwdata(1);
503 reg_sp.config_active_interruption_onError <= apbi.pwdata(1);
512 reg_sp.config_ms_run <= apbi.pwdata(2);
504 reg_sp.config_ms_run <= apbi.pwdata(2);
513 WHEN "000001" => reg_sp.status_ready_matrix_f0_0 <= apbi.pwdata(0);
505 WHEN "000001" => reg_sp.status_ready_matrix_f0_0 <= apbi.pwdata(0);
514 reg_sp.status_ready_matrix_f0_1 <= apbi.pwdata(1);
506 reg_sp.status_ready_matrix_f0_1 <= apbi.pwdata(1);
515 reg_sp.status_ready_matrix_f1_0 <= apbi.pwdata(2);
507 reg_sp.status_ready_matrix_f1_0 <= apbi.pwdata(2);
516 reg_sp.status_ready_matrix_f1_1 <= apbi.pwdata(3);
508 reg_sp.status_ready_matrix_f1_1 <= apbi.pwdata(3);
517 reg_sp.status_ready_matrix_f2_0 <= apbi.pwdata(4);
509 reg_sp.status_ready_matrix_f2_0 <= apbi.pwdata(4);
518 reg_sp.status_ready_matrix_f2_1 <= apbi.pwdata(5);
510 reg_sp.status_ready_matrix_f2_1 <= apbi.pwdata(5);
519 reg_sp.status_error_bad_component_error <= apbi.pwdata(6);
511 reg_sp.status_error_bad_component_error <= apbi.pwdata(6);
520 reg_sp.status_error_buffer_full <= apbi.pwdata(7);
512 reg_sp.status_error_buffer_full <= apbi.pwdata(7);
521 reg_sp.status_error_input_fifo_write(0) <= apbi.pwdata(8);
513 reg_sp.status_error_input_fifo_write(0) <= apbi.pwdata(8);
522 reg_sp.status_error_input_fifo_write(1) <= apbi.pwdata(9);
514 reg_sp.status_error_input_fifo_write(1) <= apbi.pwdata(9);
523 reg_sp.status_error_input_fifo_write(2) <= apbi.pwdata(10);
515 reg_sp.status_error_input_fifo_write(2) <= apbi.pwdata(10);
524 --2
516 --2
525 WHEN "000010" => reg_sp.addr_matrix_f0_0 <= apbi.pwdata;
517 WHEN "000010" => reg_sp.addr_matrix_f0_0 <= apbi.pwdata;
526 WHEN "000011" => reg_sp.addr_matrix_f0_1 <= apbi.pwdata;
518 WHEN "000011" => reg_sp.addr_matrix_f0_1 <= apbi.pwdata;
527 WHEN "000100" => reg_sp.addr_matrix_f1_0 <= apbi.pwdata;
519 WHEN "000100" => reg_sp.addr_matrix_f1_0 <= apbi.pwdata;
528 WHEN "000101" => reg_sp.addr_matrix_f1_1 <= apbi.pwdata;
520 WHEN "000101" => reg_sp.addr_matrix_f1_1 <= apbi.pwdata;
529 WHEN "000110" => reg_sp.addr_matrix_f2_0 <= apbi.pwdata;
521 WHEN "000110" => reg_sp.addr_matrix_f2_0 <= apbi.pwdata;
530 WHEN "000111" => reg_sp.addr_matrix_f2_1 <= apbi.pwdata;
522 WHEN "000111" => reg_sp.addr_matrix_f2_1 <= apbi.pwdata;
531 --8 to 19
523 --8 to 19
532 --20
524 --20
533 WHEN "010100" => reg_wp.data_shaping_BW <= apbi.pwdata(0);
525 WHEN "010100" => reg_wp.data_shaping_BW <= apbi.pwdata(0);
534 reg_wp.data_shaping_SP0 <= apbi.pwdata(1);
526 reg_wp.data_shaping_SP0 <= apbi.pwdata(1);
535 reg_wp.data_shaping_SP1 <= apbi.pwdata(2);
527 reg_wp.data_shaping_SP1 <= apbi.pwdata(2);
536 reg_wp.data_shaping_R0 <= apbi.pwdata(3);
528 reg_wp.data_shaping_R0 <= apbi.pwdata(3);
537 reg_wp.data_shaping_R1 <= apbi.pwdata(4);
529 reg_wp.data_shaping_R1 <= apbi.pwdata(4);
538 WHEN "010101" => reg_wp.enable_f0 <= apbi.pwdata(0);
530 WHEN "010101" => reg_wp.enable_f0 <= apbi.pwdata(0);
539 reg_wp.enable_f1 <= apbi.pwdata(1);
531 reg_wp.enable_f1 <= apbi.pwdata(1);
540 reg_wp.enable_f2 <= apbi.pwdata(2);
532 reg_wp.enable_f2 <= apbi.pwdata(2);
541 reg_wp.enable_f3 <= apbi.pwdata(3);
533 reg_wp.enable_f3 <= apbi.pwdata(3);
542 reg_wp.burst_f0 <= apbi.pwdata(4);
534 reg_wp.burst_f0 <= apbi.pwdata(4);
543 reg_wp.burst_f1 <= apbi.pwdata(5);
535 reg_wp.burst_f1 <= apbi.pwdata(5);
544 reg_wp.burst_f2 <= apbi.pwdata(6);
536 reg_wp.burst_f2 <= apbi.pwdata(6);
545 reg_wp.run <= apbi.pwdata(7);
537 reg_wp.run <= apbi.pwdata(7);
546 --22
538 --22
547 WHEN "010110" => reg_wp.addr_data_f0 <= apbi.pwdata;
539 WHEN "010110" => reg_wp.addr_data_f0 <= apbi.pwdata;
548 WHEN "010111" => reg_wp.addr_data_f1 <= apbi.pwdata;
540 WHEN "010111" => reg_wp.addr_data_f1 <= apbi.pwdata;
549 WHEN "011000" => reg_wp.addr_data_f2 <= apbi.pwdata;
541 WHEN "011000" => reg_wp.addr_data_f2 <= apbi.pwdata;
550 WHEN "011001" => reg_wp.addr_data_f3 <= apbi.pwdata;
542 WHEN "011001" => reg_wp.addr_data_f3 <= apbi.pwdata;
551 --26
543 --26
552 WHEN "011010" => reg_wp.status_full <= apbi.pwdata(3 DOWNTO 0);
544 WHEN "011010" => reg_wp.status_full <= apbi.pwdata(3 DOWNTO 0);
553 reg_wp.status_full_err <= apbi.pwdata(7 DOWNTO 4);
545 reg_wp.status_full_err <= apbi.pwdata(7 DOWNTO 4);
554 reg_wp.status_new_err <= apbi.pwdata(11 DOWNTO 8);
546 reg_wp.status_new_err <= apbi.pwdata(11 DOWNTO 8);
555 status_full_ack(0) <= reg_wp.status_full(0) AND NOT apbi.pwdata(0);
547 status_full_ack(0) <= reg_wp.status_full(0) AND NOT apbi.pwdata(0);
556 status_full_ack(1) <= reg_wp.status_full(1) AND NOT apbi.pwdata(1);
548 status_full_ack(1) <= reg_wp.status_full(1) AND NOT apbi.pwdata(1);
557 status_full_ack(2) <= reg_wp.status_full(2) AND NOT apbi.pwdata(2);
549 status_full_ack(2) <= reg_wp.status_full(2) AND NOT apbi.pwdata(2);
558 status_full_ack(3) <= reg_wp.status_full(3) AND NOT apbi.pwdata(3);
550 status_full_ack(3) <= reg_wp.status_full(3) AND NOT apbi.pwdata(3);
559 WHEN "011011" => reg_wp.delta_snapshot <= apbi.pwdata(delta_vector_size-1 DOWNTO 0);
551 WHEN "011011" => reg_wp.delta_snapshot <= apbi.pwdata(delta_vector_size-1 DOWNTO 0);
560 WHEN "011100" => reg_wp.delta_f0 <= apbi.pwdata(delta_vector_size-1 DOWNTO 0);
552 WHEN "011100" => reg_wp.delta_f0 <= apbi.pwdata(delta_vector_size-1 DOWNTO 0);
561 WHEN "011101" => reg_wp.delta_f0_2 <= apbi.pwdata(delta_vector_size_f0_2-1 DOWNTO 0);
553 WHEN "011101" => reg_wp.delta_f0_2 <= apbi.pwdata(delta_vector_size_f0_2-1 DOWNTO 0);
562 WHEN "011110" => reg_wp.delta_f1 <= apbi.pwdata(delta_vector_size-1 DOWNTO 0);
554 WHEN "011110" => reg_wp.delta_f1 <= apbi.pwdata(delta_vector_size-1 DOWNTO 0);
563 WHEN "011111" => reg_wp.delta_f2 <= apbi.pwdata(delta_vector_size-1 DOWNTO 0);
555 WHEN "011111" => reg_wp.delta_f2 <= apbi.pwdata(delta_vector_size-1 DOWNTO 0);
564 WHEN "100000" => reg_wp.nb_data_by_buffer <= apbi.pwdata(nb_data_by_buffer_size-1 DOWNTO 0);
556 WHEN "100000" => reg_wp.nb_data_by_buffer <= apbi.pwdata(nb_data_by_buffer_size-1 DOWNTO 0);
565 WHEN "100001" => reg_wp.nb_snapshot_param <= apbi.pwdata(nb_snapshot_param_size-1 DOWNTO 0);
557 WHEN "100001" => reg_wp.nb_snapshot_param <= apbi.pwdata(nb_snapshot_param_size-1 DOWNTO 0);
566 WHEN "100010" => reg_wp.start_date <= apbi.pwdata(30 DOWNTO 0);
558 WHEN "100010" => reg_wp.start_date <= apbi.pwdata(30 DOWNTO 0);
567 WHEN "100011" => reg_wp.nb_word_by_buffer <= apbi.pwdata(nb_word_by_buffer_size-1 DOWNTO 0);
559 WHEN "100011" => reg_wp.nb_word_by_buffer <= apbi.pwdata(nb_word_by_buffer_size-1 DOWNTO 0);
568 --
560 --
569 WHEN OTHERS => NULL;
561 WHEN OTHERS => NULL;
570 END CASE;
562 END CASE;
571 END IF;
563 END IF;
572 END IF;
564 END IF;
573
565
574 apbo.pirq(pirq_ms) <= ((reg_sp.config_active_interruption_onNewMatrix AND (ready_matrix_f0 OR
566 apbo.pirq(pirq_ms) <= ((reg_sp.config_active_interruption_onNewMatrix AND (ready_matrix_f0 OR
575 ready_matrix_f1 OR
567 ready_matrix_f1 OR
576 ready_matrix_f2)
568 ready_matrix_f2)
577 )
569 )
578 OR
570 OR
579 (reg_sp.config_active_interruption_onError AND (
571 (reg_sp.config_active_interruption_onError AND (
580 error_bad_component_error
572 error_bad_component_error
581 OR error_buffer_full
573 OR error_buffer_full
582 OR error_input_fifo_write(0)
574 OR error_input_fifo_write(0)
583 OR error_input_fifo_write(1)
575 OR error_input_fifo_write(1)
584 OR error_input_fifo_write(2))
576 OR error_input_fifo_write(2))
585 ));
577 ));
586
578
587 apbo.pirq(pirq_wfp) <= ored_irq_wfp;
579 apbo.pirq(pirq_wfp) <= ored_irq_wfp;
588
580
589 END IF;
581 END IF;
590 END PROCESS lpp_lfr_apbreg;
582 END PROCESS lpp_lfr_apbreg;
591
583
592 apbo.pindex <= pindex;
584 apbo.pindex <= pindex;
593 apbo.pconfig <= pconfig;
585 apbo.pconfig <= pconfig;
594 apbo.prdata <= prdata;
586 apbo.prdata <= prdata;
595
587
596 -----------------------------------------------------------------------------
588 -----------------------------------------------------------------------------
597 -- IRQ
589 -- IRQ
598 -----------------------------------------------------------------------------
590 -----------------------------------------------------------------------------
599 irq_wfp_reg_s <= status_full & status_full_err & status_new_err;
591 irq_wfp_reg_s <= status_full & status_full_err & status_new_err;
600
592
601 PROCESS (HCLK, HRESETn)
593 PROCESS (HCLK, HRESETn)
602 BEGIN -- PROCESS
594 BEGIN -- PROCESS
603 IF HRESETn = '0' THEN -- asynchronous reset (active low)
595 IF HRESETn = '0' THEN -- asynchronous reset (active low)
604 irq_wfp_reg <= (OTHERS => '0');
596 irq_wfp_reg <= (OTHERS => '0');
605 ELSIF HCLK'EVENT AND HCLK = '1' THEN -- rising clock edge
597 ELSIF HCLK'EVENT AND HCLK = '1' THEN -- rising clock edge
606 irq_wfp_reg <= irq_wfp_reg_s;
598 irq_wfp_reg <= irq_wfp_reg_s;
607 END IF;
599 END IF;
608 END PROCESS;
600 END PROCESS;
609
601
610 all_irq_wfp : FOR I IN IRQ_WFP_SIZE-1 DOWNTO 0 GENERATE
602 all_irq_wfp : FOR I IN IRQ_WFP_SIZE-1 DOWNTO 0 GENERATE
611 irq_wfp(I) <= (NOT irq_wfp_reg(I)) AND irq_wfp_reg_s(I);
603 irq_wfp(I) <= (NOT irq_wfp_reg(I)) AND irq_wfp_reg_s(I);
612 END GENERATE all_irq_wfp;
604 END GENERATE all_irq_wfp;
613
605
614 irq_wfp_ZERO <= (OTHERS => '0');
606 irq_wfp_ZERO <= (OTHERS => '0');
615 ored_irq_wfp <= '0' WHEN irq_wfp = irq_wfp_ZERO ELSE '1';
607 ored_irq_wfp <= '0' WHEN irq_wfp = irq_wfp_ZERO ELSE '1';
616
608
617 run_ms <= reg_sp.config_ms_run;
609 run_ms <= reg_sp.config_ms_run;
618
610
619 -----------------------------------------------------------------------------
611 -----------------------------------------------------------------------------
620 --
612 --
621 -----------------------------------------------------------------------------
613 -----------------------------------------------------------------------------
622 lpp_apbreg_ms_pointer_f0 : lpp_apbreg_ms_pointer
614 lpp_apbreg_ms_pointer_f0 : lpp_apbreg_ms_pointer
623 PORT MAP (
615 PORT MAP (
624 clk => HCLK,
616 clk => HCLK,
625 rstn => HRESETn,
617 rstn => HRESETn,
626
618
627 reg0_status_ready_matrix => reg_sp.status_ready_matrix_f0_0,
619 reg0_status_ready_matrix => reg_sp.status_ready_matrix_f0_0,
628 reg0_ready_matrix => reg0_ready_matrix_f0,
620 reg0_ready_matrix => reg0_ready_matrix_f0,
629 reg0_addr_matrix => reg0_addr_matrix_f0,
621 reg0_addr_matrix => reg_sp.addr_matrix_f0_0,--reg0_addr_matrix_f0,
630 reg0_matrix_time => reg0_matrix_time_f0,
622 reg0_matrix_time => reg_sp.time_matrix_f0_0,--reg0_matrix_time_f0,
631
623
632 reg1_status_ready_matrix => reg_sp.status_ready_matrix_f0_1,
624 reg1_status_ready_matrix => reg_sp.status_ready_matrix_f0_1,
633 reg1_ready_matrix => reg1_ready_matrix_f0,
625 reg1_ready_matrix => reg1_ready_matrix_f0,
634 reg1_addr_matrix => reg1_addr_matrix_f0,
626 reg1_addr_matrix => reg_sp.addr_matrix_f0_1,--reg1_addr_matrix_f0,
635 reg1_matrix_time => reg1_matrix_time_f0,
627 reg1_matrix_time => reg_sp.time_matrix_f0_1,--reg1_matrix_time_f0,
636
628
637 ready_matrix => ready_matrix_f0,
629 ready_matrix => ready_matrix_f0,
638 status_ready_matrix => status_ready_matrix_f0,
630 status_ready_matrix => status_ready_matrix_f0,
639 addr_matrix => addr_matrix_f0,
631 addr_matrix => addr_matrix_f0,
640 matrix_time => matrix_time_f0);
632 matrix_time => matrix_time_f0);
641
633
642 lpp_apbreg_ms_pointer_f1 : lpp_apbreg_ms_pointer
634 lpp_apbreg_ms_pointer_f1 : lpp_apbreg_ms_pointer
643 PORT MAP (
635 PORT MAP (
644 clk => HCLK,
636 clk => HCLK,
645 rstn => HRESETn,
637 rstn => HRESETn,
646
638
647 reg0_status_ready_matrix => reg_sp.status_ready_matrix_f1_0,
639 reg0_status_ready_matrix => reg_sp.status_ready_matrix_f1_0,
648 reg0_ready_matrix => reg0_ready_matrix_f1,
640 reg0_ready_matrix => reg0_ready_matrix_f1,
649 reg0_addr_matrix => reg0_addr_matrix_f1,
641 reg0_addr_matrix => reg_sp.addr_matrix_f1_0,--reg0_addr_matrix_f1,
650 reg0_matrix_time => reg0_matrix_time_f1,
642 reg0_matrix_time => reg_sp.time_matrix_f1_0,--reg0_matrix_time_f1,
651
643
652 reg1_status_ready_matrix => reg_sp.status_ready_matrix_f1_1,
644 reg1_status_ready_matrix => reg_sp.status_ready_matrix_f1_1,
653 reg1_ready_matrix => reg1_ready_matrix_f1,
645 reg1_ready_matrix => reg1_ready_matrix_f1,
654 reg1_addr_matrix => reg1_addr_matrix_f1,
646 reg1_addr_matrix => reg_sp.addr_matrix_f1_1,--reg1_addr_matrix_f1,
655 reg1_matrix_time => reg1_matrix_time_f1,
647 reg1_matrix_time => reg_sp.time_matrix_f1_1,--reg1_matrix_time_f1,
656
648
657 ready_matrix => ready_matrix_f1,
649 ready_matrix => ready_matrix_f1,
658 status_ready_matrix => status_ready_matrix_f1,
650 status_ready_matrix => status_ready_matrix_f1,
659 addr_matrix => addr_matrix_f1,
651 addr_matrix => addr_matrix_f1,
660 matrix_time => matrix_time_f1);
652 matrix_time => matrix_time_f1);
661
653
662 lpp_apbreg_ms_pointer_f2 : lpp_apbreg_ms_pointer
654 lpp_apbreg_ms_pointer_f2 : lpp_apbreg_ms_pointer
663 PORT MAP (
655 PORT MAP (
664 clk => HCLK,
656 clk => HCLK,
665 rstn => HRESETn,
657 rstn => HRESETn,
666
658
667 reg0_status_ready_matrix => reg_sp.status_ready_matrix_f2_0,
659 reg0_status_ready_matrix => reg_sp.status_ready_matrix_f2_0,
668 reg0_ready_matrix => reg0_ready_matrix_f2,
660 reg0_ready_matrix => reg0_ready_matrix_f2,
669 reg0_addr_matrix => reg0_addr_matrix_f2,
661 reg0_addr_matrix => reg_sp.addr_matrix_f2_0,--reg0_addr_matrix_f2,
670 reg0_matrix_time => reg0_matrix_time_f2,
662 reg0_matrix_time => reg_sp.time_matrix_f2_0,--reg0_matrix_time_f2,
671
663
672 reg1_status_ready_matrix => reg_sp.status_ready_matrix_f2_1,
664 reg1_status_ready_matrix => reg_sp.status_ready_matrix_f2_1,
673 reg1_ready_matrix => reg1_ready_matrix_f2,
665 reg1_ready_matrix => reg1_ready_matrix_f2,
674 reg1_addr_matrix => reg1_addr_matrix_f2,
666 reg1_addr_matrix => reg_sp.addr_matrix_f2_1,--reg1_addr_matrix_f2,
675 reg1_matrix_time => reg1_matrix_time_f2,
667 reg1_matrix_time => reg_sp.time_matrix_f2_1,--reg1_matrix_time_f2,
676
668
677 ready_matrix => ready_matrix_f2,
669 ready_matrix => ready_matrix_f2,
678 status_ready_matrix => status_ready_matrix_f2,
670 status_ready_matrix => status_ready_matrix_f2,
679 addr_matrix => addr_matrix_f2,
671 addr_matrix => addr_matrix_f2,
680 matrix_time => matrix_time_f2);
672 matrix_time => matrix_time_f2);
681
673
682
674
683 END beh; No newline at end of file
675 END beh;
@@ -1,81 +1,93
1 ------------------------------------------------------------------------------
1 ------------------------------------------------------------------------------
2 -- This file is a part of the LPP VHDL IP LIBRARY
2 -- This file is a part of the LPP VHDL IP LIBRARY
3 -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS
3 -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS
4 --
4 --
5 -- This program is free software; you can redistribute it and/or modify
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 3 of the License, or
7 -- the Free Software Foundation; either version 3 of the License, or
8 -- (at your option) any later version.
8 -- (at your option) any later version.
9 --
9 --
10 -- This program is distributed in the hope that it will be useful,
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
13 -- GNU General Public License for more details.
14 --
14 --
15 -- You should have received a copy of the GNU General Public License
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------
18 -------------------------------------------------------------------------------
19 -- Author : Jean-christophe Pellion
19 -- Author : Jean-christophe Pellion
20 -- Mail : jean-christophe.pellion@lpp.polytechnique.fr
20 -- Mail : jean-christophe.pellion@lpp.polytechnique.fr
21 -- jean-christophe.pellion@easii-ic.com
21 -- jean-christophe.pellion@easii-ic.com
22 ----------------------------------------------------------------------------
22 ----------------------------------------------------------------------------
23
23
24 LIBRARY ieee;
24 LIBRARY ieee;
25 USE ieee.std_logic_1164.ALL;
25 USE ieee.std_logic_1164.ALL;
26
26
27 ENTITY lpp_apbreg_ms_pointer IS
27 ENTITY lpp_apbreg_ms_pointer IS
28
28
29 PORT (
29 PORT (
30 clk : IN STD_LOGIC;
30 clk : IN STD_LOGIC;
31 rstn : IN STD_LOGIC;
31 rstn : IN STD_LOGIC;
32
32
33 -- REG 0
33 -- REG 0
34 reg0_status_ready_matrix : IN STD_LOGIC;
34 reg0_status_ready_matrix : IN STD_LOGIC;
35 reg0_ready_matrix : OUT STD_LOGIC;
35 reg0_ready_matrix : OUT STD_LOGIC;
36 reg0_addr_matrix : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
36 reg0_addr_matrix : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
37 reg0_matrix_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
37 reg0_matrix_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
38
38
39 -- REG 1
39 -- REG 1
40 reg1_status_ready_matrix : IN STD_LOGIC;
40 reg1_status_ready_matrix : IN STD_LOGIC;
41 reg1_ready_matrix : OUT STD_LOGIC;
41 reg1_ready_matrix : OUT STD_LOGIC;
42 reg1_addr_matrix : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
42 reg1_addr_matrix : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
43 reg1_matrix_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
43 reg1_matrix_time : OUT STD_LOGIC_VECTOR(47 DOWNTO 0);
44
44
45 -- SpectralMatrix
45 -- SpectralMatrix
46 ready_matrix : IN STD_LOGIC;
46 ready_matrix : IN STD_LOGIC;
47 status_ready_matrix : OUT STD_LOGIC;
47 status_ready_matrix : OUT STD_LOGIC;
48 addr_matrix : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
48 addr_matrix : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
49 matrix_time : IN STD_LOGIC_VECTOR(47 DOWNTO 0)
49 matrix_time : IN STD_LOGIC_VECTOR(47 DOWNTO 0)
50 );
50 );
51
51
52 END lpp_apbreg_ms_pointer;
52 END lpp_apbreg_ms_pointer;
53
53
54 ARCHITECTURE beh OF lpp_apbreg_ms_pointer IS
54 ARCHITECTURE beh OF lpp_apbreg_ms_pointer IS
55
55
56 SIGNAL current_reg : STD_LOGIC;
56 SIGNAL current_reg : STD_LOGIC;
57
57
58 BEGIN -- beh
58 BEGIN -- beh
59
59
60 PROCESS (clk, rstn)
60 PROCESS (clk, rstn)
61 BEGIN -- PROCESS
61 BEGIN -- PROCESS
62 IF rstn = '0' THEN -- asynchronous reset (active low)
62 IF rstn = '0' THEN -- asynchronous reset (active low)
63 current_reg <= '0';
63 current_reg <= '0';
64 reg0_matrix_time <= (OTHERS => '0');
65 reg1_matrix_time <= (OTHERS => '0');
64
66
65 ELSIF clk'EVENT AND clk = '1' THEN -- rising clock edge
67 ELSIF clk'EVENT AND clk = '1' THEN -- rising clock edge
66 IF ready_matrix = '1' THEN
68 IF ready_matrix = '1' THEN
67 current_reg <= NOT current_reg;
69 current_reg <= NOT current_reg;
68 END IF;
70 END IF;
71 IF current_reg = '0' THEN
72 reg0_matrix_time <= matrix_time;
73 END IF;
74 IF current_reg = '1' THEN
75 reg1_matrix_time <= matrix_time;
76 END IF;
77
69 END IF;
78 END IF;
70 END PROCESS;
79 END PROCESS;
71
80
72 addr_matrix <= reg0_addr_matrix WHEN current_reg = '0' ELSE
81 addr_matrix <= reg0_addr_matrix WHEN current_reg = '0' ELSE
73 reg1_addr_matrix;
82 reg1_addr_matrix;
74
83
75 status_ready_matrix <= reg0_status_ready_matrix WHEN current_reg = '0' ELSE
84 status_ready_matrix <= reg0_status_ready_matrix WHEN current_reg = '0' ELSE
76 reg1_status_ready_matrix;
85 reg1_status_ready_matrix;
77
86
78 reg0_ready_matrix <= ready_matrix WHEN current_reg = '0' ELSE '0';
87 reg0_ready_matrix <= ready_matrix WHEN current_reg = '0' ELSE '0';
79 reg1_ready_matrix <= ready_matrix WHEN current_reg = '1' ELSE '0';
88 reg1_ready_matrix <= ready_matrix WHEN current_reg = '1' ELSE '0';
80
89
81 END beh; No newline at end of file
90
91
92
93 END beh;
General Comments 0
You need to be logged in to leave comments. Login now