Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
conv-common-gw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
level-conversion
conv-common-gw
Commits
0026c3da
Commit
0026c3da
authored
Dec 16, 2016
by
Denia Bouhired-Ferrag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small bug fixes, changes temperature limits and thermal model characteristics
parent
cba9c6a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
31 deletions
+37
-31
conv_dyn_burst_ctrl.vhd
modules/conv_dyn_burst_ctrl.vhd
+37
-31
No files found.
modules/conv_dyn_burst_ctrl.vhd
View file @
0026c3da
...
...
@@ -74,16 +74,16 @@ entity conv_dyn_burst_ctrl is
architecture
behav
of
conv_dyn_burst_ctrl
is
type
t_temp_decre
is
array
(
0
to
6
)
of
integer
;
type
t_temp_decre
is
array
(
0
to
5
)
of
integer
;
-----signals declaration----------
signal
temp_decre
:
t_temp_decre
:
=
(
0
,
1668
,
200
,
38
,
20
,
4
,
100
);
signal
temp_decre
:
t_temp_decre
:
=
(
0
,
769
,
31
,
104
,
14
,
82
);
signal
burst_ctrl_rst
:
std_logic
;
signal
pulse_train_in
:
std_logic
;
signal
temp_rise
:
unsigned
(
39
downto
0
)
;
signal
test
:
integer
;
--
signal test : integer ;
signal
temp_fall
:
unsigned
(
39
downto
0
)
;
signal
single_cycle_cnt
:
integer
;
signal
five_cycle_cnt
:
integer
;
...
...
@@ -96,32 +96,28 @@ entity conv_dyn_burst_ctrl is
begin
-- Generate the pulse on rising edge of pulse_burst_i
p_pulse_redge
:
process
(
clk_i
,
burst_ctrl_rst
,
pulse_burst_i
,
pulse_train_in_r_edge_p
)
p_pulse_redge
:
process
(
burst_ctrl_rst
,
pulse_burst_i
)
begin
if
rising_edge
(
clk_i
)
then
if
rst_n_i
=
'0'
then
burst_err_p_o
<=
'0'
;
elsif
(
en_i
=
'1'
)
then
if
(
burst_ctrl_rst
=
'1'
)
then
if
falling_edge
(
pulse_burst_i
)
then
pulse_train_in
<=
'0'
;
end
if
;
burst_err_p_o
<=
'0'
;
if
pulse_train_in_r_edge_p
=
'1'
then
burst_err_p_o
<=
'1'
;
end
if
;
elsif
(
burst_ctrl_rst
=
'0'
)
then
--if rising_edge(clk_i) then
if
rst_n_i
=
'0'
then
-- burst_err_p_o <= '0';
elsif
(
en_i
=
'1'
)
then
if
(
burst_ctrl_rst
=
'1'
)
then
if
falling_edge
(
pulse_burst_i
)
then
pulse_train_in
<=
'0'
;
end
if
;
-- burst_err_p_o <= '0';
-- if pulse_train_in_r_edge_p = '1' then
-- burst_err_p_o <= '1';
-- end if;
elsif
(
burst_ctrl_rst
=
'0'
)
then
--if (pulse_burst_i = '0') then
pulse_train_in
<=
pulse_burst_i
;
--re-activate output only if input line is off
--end if;
end
if
;
end
if
;
end
if
;
--
end if;
end
process
p_pulse_redge
;
p_pulse_redge_detect
:
process
(
clk_i
)
is
...
...
@@ -157,7 +153,7 @@ temp_rise_c <=temp_rise;
elsif
pulse_train_in
=
'0'
then
single_cycle_cnt
<=
single_cycle_cnt
+
1
;
if
single_cycle_cnt
=
5
then
if
five_cycle_cnt
<
7
then
if
five_cycle_cnt
<
6
then
five_cycle_cnt
<=
five_cycle_cnt
+
1
;
end
if
;
single_cycle_cnt
<=
1
;
...
...
@@ -170,7 +166,7 @@ temp_rise_c <=temp_rise;
end
process
p_five_cycle_cnt
;
p_thermal_sim
:
process
(
clk_i
,
five_cycle_cnt
)
p_thermal_sim
:
process
(
clk_i
)
begin
if
rising_edge
(
clk_i
)
then
...
...
@@ -178,26 +174,36 @@ temp_rise_c <=temp_rise;
if
rst_n_i
=
'0'
then
temp_rise
<=
(
others
=>
'0'
);
burst_ctrl_rst
<=
'1'
;
burst_err_p_o
<=
'0'
;
else
if
signed
(
temp_rise
)
>=
0
and
(
signed
(
temp_rise
)
<=
signed
(
g_max_temp
))
then
if
pulse_burst_i
=
'0'
then
burst_ctrl_rst
<=
'0'
;
burst_err_p_o
<=
'0'
;
end
if
;
if
pulse_train_in_r_edge_p
=
'1'
and
burst_ctrl_rst
/=
'1'
then
-- temperature less than maximum
temp_rise
<=
temp_rise
+
g_1_pulse_temp_rise
;
elsif
signed
(
temp_rise
)
>
0
and
pulse_train_in
=
'0'
then
--temperature fall between pulses
test
<=
temp_decre
(
five_cycle_cnt
-1
);
if
temp_rise
>
190
then
if
pulse_train_in_r_edge_p
=
'1'
then
if
burst_ctrl_rst
=
'0'
then
-- temperature less than maximum
temp_rise
<=
temp_rise
+
g_1_pulse_temp_rise
;
else
burst_err_p_o
<=
'1'
;
end
if
;
elsif
signed
(
temp_rise
)
/=
0
and
pulse_train_in
=
'0'
then
--temperature fall between pulses
--test <= temp_decre(five_cycle_cnt-1);
if
temp_rise
>
temp_decre
(
five_cycle_cnt
-1
)
then
temp_rise
<=
temp_rise
-
to_unsigned
(
temp_decre
(
five_cycle_cnt
-1
),
40
);
else
temp_rise
<=
(
others
=>
'0'
);
end
if
;
end
if
;
elsif
(
signed
(
temp_rise
)
>
signed
(
g_max_temp
))
and
pulse_train_in
=
'0'
then
-- and (pulse_train_in_f_edge_p = '1') then
burst_ctrl_rst
<=
'1'
;
burst_ctrl_rst
<=
'1'
;
burst_err_p_o
<=
'0'
;
if
pulse_train_in_r_edge_p
=
'1'
then
burst_err_p_o
<=
'1'
;
end
if
;
temp_rise
<=
temp_rise
-
temp_decre
(
five_cycle_cnt
-1
);
end
if
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment