Line 75... |
Line 75... |
architecture behave of o8_sys_timer_ii is
|
architecture behave of o8_sys_timer_ii is
|
|
|
alias Clock is Open8_Bus.Clock;
|
alias Clock is Open8_Bus.Clock;
|
alias Reset is Open8_Bus.Reset;
|
alias Reset is Open8_Bus.Reset;
|
alias uSec_Tick is Open8_Bus.uSec_Tick;
|
alias uSec_Tick is Open8_Bus.uSec_Tick;
|
|
alias CPU_Wr_En is Open8_Bus.Wr_En
|
|
alias CPU_Rd_En is Open8_Bus.Rd_En
|
|
|
constant User_Addr : std_logic_vector(15 downto 2) :=
|
constant User_Addr : std_logic_vector(15 downto 2) :=
|
Address(15 downto 2);
|
Address(15 downto 2);
|
alias Comp_Addr is Open8_Bus.Address(15 downto 2);
|
alias Comp_Addr is Open8_Bus.Address(15 downto 2);
|
signal Addr_Match : std_logic := '0';
|
signal Addr_Match : std_logic := '0';
|
Line 112... |
Line 114... |
signal Timer_Tick : std_logic := '0';
|
signal Timer_Tick : std_logic := '0';
|
|
|
begin
|
begin
|
|
|
Addr_Match <= '1' when Comp_Addr = User_Addr else '0';
|
Addr_Match <= '1' when Comp_Addr = User_Addr else '0';
|
Wr_En_d <= Addr_Match and Open8_Bus.Wr_En;
|
Wr_En_d <= Addr_Match and Write_Qual and CPU_Wr_En;
|
Rd_En_d <= Addr_Match and Open8_Bus.Rd_En;
|
Rd_En_d <= Addr_Match and CPU_Rd_En;
|
|
|
mSec_Resolution_enabled : if( mSec_Resolution )generate
|
mSec_Resolution_enabled : if( mSec_Resolution )generate
|
|
|
mSec_Tick_proc: process( Clock, Reset )
|
mSec_Tick_proc: process( Clock, Reset )
|
begin
|
begin
|
Line 158... |
Line 160... |
Reg_Sel_q <= Reg_Sel_d;
|
Reg_Sel_q <= Reg_Sel_d;
|
|
|
Wr_En_q <= Wr_En_d;
|
Wr_En_q <= Wr_En_d;
|
Wr_Data_q <= Wr_Data_d;
|
Wr_Data_q <= Wr_Data_d;
|
Update_Interval <= '0';
|
Update_Interval <= '0';
|
if( Wr_En_q = '1' and Write_Qual = '1' )then
|
if( Wr_En_q = '1' )then
|
case( Reg_Sel_q )is
|
case( Reg_Sel_q )is
|
when "00" =>
|
when "00" =>
|
Req_Interval_B0 <= Wr_Data_q;
|
Req_Interval_B0 <= Wr_Data_q;
|
Update_Pending <= '1';
|
Update_Pending <= '1';
|
when "01" =>
|
when "01" =>
|