Audioport Requirements 2024
Audioport Requirements 2024
standby_mode Writing the command code CMD_STOP into the CMD_REG register puts the
play_mode audioport
Writing theinto standbycode
command mode. After entering
CMD_STOP standby
into the mode register
CMD_REG the audioport
puts thestops
generating
audioport I2S
into data
play within
mode. CLK_DIV_48000
After entering clock
play mode cycles
the audioport
data_rountrip A streaming data cycle begins when the i2s_unit generates a pulse begins to
mreq, and
generate I2S data a within CLK_DIV_48000 clock cycles.
dsp_unit_max_latency ends when the is2_unit receives a pulse mtick, provided that the audioport is in
playmode throughout this sequence. The roundtrip time of this shorter than one
irq_out irq_out
192kHz should
samplerise when AUDUIO_BUFFER_SIZE stereo samples have been
period.
sck_out serialized, and fall when
sck_out should show a valid the I2S
interrupt is acknowledged
SCK waveform by writing
for the selected the command
sample rate. This
code CMD_IRQ_ACK
requirement is covered or CMD_STOP
in detail in into
the the CMD_REG
i2s_unit register.
specifications and verified with
sdo_out sdo_out should contain the data written into the ABUF region of the
the i2s_unit.
control_unit's
ws_out sck_out shouldregister
show abank, andWS
valid I2S processed
waveform in the
for dsp_unit,
the selectedin serial
sampleformat
rate. This
specified in the I2S specification. This requirement is covered
requirement is covered in detail in the i2s_unit specifications and verified in detail in the
with
control_unit,
the i2s_unit. dsp_unit and i2s_unit specifications and verified with these
Err:508
TEST NAME DESCRIPTION
audioport_test Simple test program meant to perform a basic sanity-check. The
apb_test test initializes
A simple registers,example
UVM--based configures
of athe audioport,
read/write testand
forstarts and
the APB-
stops
based playback.
register interface with randomofstimulus dataunit.
generation
control_unit_uvm_test An UVM test that tests the function the control
and
The analysis
test uses components.
audioport_uvm_test A complex testtwo agents,
that the control_unit_agent
demonstrates that handles
the use of a scoreboard with a
the APB interface, and the irq_out_agent
reference mode and hierarchical sequences. that handles the
irq_out port.
TEST SEQUENCE
Notice: This test does not control the reset input rst_n.
1. Set scan_en_in,
Random test_mode_in
APB bus addresses are firstand APB inputs
written to andto zero,
then andfrom
read wait(apb_sequence).
until reset rst_n rises.
The results
1. Write and coverage
random are analyzed
configuration data to inallan analyzer
registers in component (apb_analyzer).
DSP_REGS region.
2. Write an increasing sequence of values starting from 1 into the ABUF region registers.
IMMEDIATE
ASSERTIONS
/
//
//
#
//
V
/A
L
FR BACKLINK NAME DESCRIPTION
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
PROPERTY CLOCK RESET DIRECTIVE COVER
CODE
NAME KIND TYPE
level_reg interconnect logic [31:0]
cfg_reg interconnect logic [31:0]
dsp_regs interconnect logic [DSP_REGISTERS*32-
1:0]
level interconnect logic
cfg interconnect logic
clr interconnect logic
req interconnect logic
audio0 interconnect logic [23:0]
audio1 interconnect logic [23:0]
tick interconnect logic
play interconnect logic
dsp0 interconnect logic [23:0]
dsp1 interconnect logic [23:0]
dsp_tick interconnect logic
mcfg_reg interconnect logic [31:0]
mcfg interconnect logic
mplay interconnect logic
mreq interconnect logic
mtick interconnect logic
mdsp0 interconnect logic [23:0]
mdsp1 interconnect logic [23:0]
mclk_mux interconnect logic
mrst_n interconnect logic
control_unit_1 instance control_unit
dsp_unit_1 instance dsp_unit
Instance of cdc_unit.
Instance of i2s_unit.
DESIGN INTENT SIGNAL DECLARATION
logic [31:0] level_reg;
logic [31:0] cfg_reg;
logic [DSP_REGISTERS*32-1:0] dsp_regs;
logic level;
logic cfg;
logic clr;
logic req;
logic [23:0] audio0;
logic [23:0] audio1;
logic tick;
logic play;
logic [23:0] dsp0;
logic [23:0] dsp1;
logic dsp_tick;
logic [31:0] mcfg_reg;
logic mcfg;
logic mplay;
logic mreq;
logic mtick;
logic [23:0] mdsp0;
logic [23:0] mdsp1;
logic mrst_n;
INPUTS:
clk clk
rst_n rst_n
PSEL PSEL
PENABLE PENABLE
PWRITE PWRITE
PADDR PADDR
PWDATA PWDATA
req_in req
OUTPUTS:
PRDATA PRDATA
PSLVERR PSLVERR
PREADY PREADY
irq_out irq_out
cfg_reg_out cfg_reg
level_reg_out level_reg
dsp_regs_out dsp_regs
cfg_out cfg
clr_out clr
level_out level
tick_out tick
audio0_out audio0
audio1_out audio1
play_out play
INPUTS:
clk clk
rst_n rst_n
audio0_in audio0
audio1_in audio1
tick_in tick
cfg_in cfg
cfg_reg_in cfg_reg
dsp_regs_in dsp_regs
level_in level
level_reg_in
INPUTS: level_reg
clk clk
rst_n rst_n
dsp0_in dsp0
dsp1_in dsp1
tick_in dsp_tick
cfg_in cfg
cfg_reg_in cfg_reg
play_in play
mclk_in mclk
INPUTS:
clk mclk_mux
rst_n mrst_n
play_in mplay
audio0_in mdsp0
audio1_in mdsp1
tick_in mtick
cfg_in mcfg
cfg_reg_in mcfg_reg
OUTPUTS:
req_out mreq
sck_out sck_out
ws_out ws_out
sdo_out sdo_out
CODE SVA MOD PORT xcheck
assign input logic [31:0] level_reg; `xcheck(level_reg);
assign input logic [31:0] cfg_reg; `xcheck(cfg_reg);
assign input logic [DSP_REGISTERS*32-1:0]`xcheck(dsp_regs);
assign input logic level; `xcheck(level);
assign input logic cfg; `xcheck(cfg);
assign input logic clr; `xcheck(clr);
assign input logic req; `xcheck(req);
assign input logic [23:0] audio0; `xcheck(audio0);
assign input logic [23:0] audio1; `xcheck(audio1);
assign input logic tick; `xcheck(tick);
assign input logic play; `xcheck(play);
assign input logic [23:0] dsp0; `xcheck(dsp0);
assign input logic [23:0] dsp1; `xcheck(dsp1);
assign input logic dsp_tick; `xcheck(dsp_tick);
assign input logic [31:0] mcfg_reg; `xcheck(mcfg_reg);
assign input logic mcfg; `xcheck(mcfg);
assign input logic mplay; `xcheck(mplay);
assign input logic mreq; `xcheck(mreq);
assign input logic mtick; `xcheck(mtick);
assign input logic [23:0] mdsp0; `xcheck(mdsp0);
assign input logic [23:0] mdsp1; `xcheck(mdsp1);
assign `xcheck(mrst_n);
control_unit control_unit_1 ;
dsp_unit dsp_unit_1 ;
cdc_unit cdc_unit_1 ;
i2s_unit i2s_unit_1 ;
connection : inport outport : connection
#NAME?
#NAME?
`xcheck(PRDATA);
`xcheck(PSLVERR);
`xcheck(PREADY);
`xcheck(irq_out);
`xcheck(sck_out);
`xcheck(ws_out);
`xcheck(sdo_out);
`xcheck(scan_en_in);
`xcheck(test_mode_in);
control_unit_svamod.sv
`xcheck(level_reg);
`xcheck(cfg_reg);
`xcheck(dsp_regs);
`xcheck(level);
`xcheck(cfg);
`xcheck(clr);
`xcheck(req);
`xcheck(audio0);
`xcheck(audio1);
`xcheck(tick);
`xcheck(play);
`xcheck(dsp0);
`xcheck(dsp1);
`xcheck(dsp_tick);
`xcheck(mcfg_reg);
`xcheck(mcfg);
`xcheck(mplay);
`xcheck(mreq);
`xcheck(mtick);
`xcheck(mdsp0);
`xcheck(mdsp1);
`xcheck(mrst_n);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 2. Blackbox (functional) assumptions and assertions
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 3. Whitebox (RTL) assertions
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 4. Covergroups
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
endmodule
control_unit_test_tasks.svh
#NAME?
Directions input output inout
Types logic unsigned signed tri bool sc_int
Port kinds data clock reset
Signal kinds register combinational interconnect instance
Process kinds combinational sequential assign guidance
Clock edges rising falling
Reset types async_0 async_1 sync_0 sync_1
Test types BB WB
Assertions assume assert
CoverSpecs coverpoint cross
YesNo YES NO
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
COMMENTS
// 1. X-checks
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 2. Blackbox (functional) assumptions and assertions
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 3. Whitebox (RTL) assertions
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 4. Covergroups
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1
2
3 // 1 // 2 // 3
eka toka kolm #VALUE!
eka toka #NAME?
TRUE
#NAME?
sc_uint