Kawasaki 80C51 Computer Hardware User Manual


 
KS152JB Universal Communications Controller
Technical Specifications
Kawasaki LSI USA, Inc. Page 88 of 120 Ver. 0.9 KS152JB2
If the channel is configured to External Demand mode, then the first if-condition is not satisfied
but the second one is. In that case the block of statements following that if-condition and delim-
ited by {...} is executed: if the demand flag (IEO for channel 0 and IE1 for channel 1) is set, the
“return 1” expression is executed and the remainder of the function is not. If the demand flag is
not set, the “return 0” expression is executed and the remainder of the function is not.
If the channel is configured to Serial Port Demand mode, the source and destination addresses,
SARn and DARn, have to be checked to see which Serial Port buffer is being addressed, and
whether its demand flag is set.
SARn refers to the 16-bit source address for “this channel”. Note that the condition “SARn =
SBUF” cannot be true unless the SAS and IAS bits in DOCNn are configured to select SFR space.
If SARn is numerically equal to the address of SBUF(99H), and SAS and ISA are configured to
select internal RAM rather than SFR space, then SARn refers to location 99H in the “upper 128”
of internal RAM, not to SBUF.
mode_logic (n)
if (DCONn indicates burst_mode) return 1:
else if (DCONn indicates external_demand_mode)
{
if (demand_flag = 1) return 1:
else return 0;
else if (DCONn indicates SP_demand_mode)
{
if {SARn = SBUF .AND. RI = 1) return 1;
else if (DARn = SBUF .AND. TI = 1) return 1;
else if (SARn = RFIFO .AND. RFNE = 1) return 1;
else if (DARn = TFIFO .AND. TFNE = 1 .AND.
previous_cycle = instruction _cycle) return 1;
else return 0;
else if (DCONn indicates alt_cycles_mode)
{
if (DCONm indicates .NOT. alt _cycles_mode
.OR. G0m = 0)
{
if (previous _cycle = instruction-cycle) return 1;
else return 0;
}
else if (previous_cycle = instruction_cycle
.AND. previous_dma_cyle = .NOT. DMAn)
return 1;
}
return 0;
end mode_logic (n);
}
}