SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
SynthWorks
Presented by
Martin Rønne, MR Logic
Slides prepared by
Jim Lewis, jim@SynthWorks.com
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
Copyright © 2017 by SynthWorks Design Inc.
Reproduction of this entire document in whole for individual usage is permitted.
All other rights reserved.
In particular, without express written permission of SynthWorks Design Inc,
You may not alter, transform, or build upon this work,
You may not use any material from this guide in a group presentation,
tutorial, training, or classroom
You must include this page in any printed copy of this document.
This material is derived from SynthWorks' Advanced VHDL Testbenches and Verification class
This material is updated from time to time and the latest copy of this is available at
http://www.SynthWorks.com/papers
Contact Information
Jim Lewis, President
SynthWorks Design Inc
11898 SW 128th Avenue
Tigard, Oregon 97223
503-590-4787
jim@SynthWorks.com
www.SynthWorks.com
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
UartTbTxProc : process
begin
. . .
UartSend(UartTxRec, X"4A") ;
UartSend(UartTxRec, X"4B") ;
. . .
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
architecture UartTx1 of TestCtrl is
. . .
begin
ControlProc : process
begin
. . .
WaitForBarrier(TestDone, 5 ms) ;
ReportAlerts ;
std.env.stop;
end process ;
CpuTestProc : process
begin
wait until nReset = '1' ;
CpuWrite(. . .) ;
Toggle(CpuRdy);
. . .
WaitForBarrier(TestDone) ;
end process ;
UartTbTxProc : process
begin
WaitForToggle(CpuRdy);
UartSend(. . .) ;
. . .
WaitForBarrier(TestDone) ;
end process ;
. . .
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
UartSend(...)
type CpuRecType is record
Rdy : std_logic_max ;
Ack : std_logic_max ;
Data : unsigned_max(7 downto 0) ;
ErrMode : unsigned_max(2 downto 0) ;
end record ;
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
procedure UartSend (
. . .
) is
begin
-- Copy Transaction to Record
UartTxRec.Data <= . . . ;
UartTxRec.ErrMode <= . . . ;
-- Handshake with UartTx
RequestTransaction(. . .);
-- Copy results from Record
. . .
end UartSend ;
entity UartTx is
port (. . .) ;
end UartTx ;
architecture Model of UartTx is
. . .
begin
. . .
UartTxFunction : process
-- declarations not shown
begin
-- Handshake with UartSend
WaitForTransaction(. . .);
-- Create UART waveforms
. . .
end process ;
end Model ;
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
Data1 := RV.RandInt(Min => 0, Max => 15) ;
Data2 := RV.RandInt(0, 15, (5,11) ) ; -- except 5 & 11
Data3 := RV.RandInt( (1,2,3,5,7,11) ) ;
Data4 := RV.RandInt( (1,2,3,5,7,11), (5,11) ) ;
. . . -- ((val1, wt1), (val2, wt2), ...)
Data6 := RV.DistValInt( ((1,7), (3,2), (5, 1)) ) ;
Data5 := RV.DistInt ( (7, 2, 1) ) ;
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
variable RV : RandomPType ;
. . .
StimGen: while TestActive loop
case RV.DistInt( (70, 10, 10, 5, 5) ) is
when 0 => -- Nominal case 70%
Operation := UARTTB_NO_ERROR ;
Data := RV.RandSlv(0, 255, Data'length) ;
when 1 => -- Parity Error 10%
Operation := UARTTB_PARITY_ERROR ;
Data := RV.RandSlv(0, 255, Data'length) ;
when . . . -- (2, 3, and 4)
end case ;
UartRxScoreboard.Push( (Data, Operation) ) ;
UartSend(UartTxRec, Data, Operation) ;
. . .
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
function GenBin ( . . . ) return CovBinType ;
type CovPType is protected
procedure AddBins ( CovBin : CovBinType ) ;
procedure AddCross( Bin1, Bin2, ... : CovBinType ) ;
procedure ICover ( val : integer ) ;
procedure ICover ( val : integer_vector ) ;
impure function IsCovered return boolean ;
procedure WriteBin ;
procedure WriteCovHoles ;
procedure ReadCovDb ( FileName : string ) ;
procedure WriteCovDb ( FileName : string; ... ) ;
. . .
end protected CovPType ;
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
architecture Test3 of tb is
shared variable ACov : CovPType ;
begin
CollectCov : process
variable RV : RandomPType ; -- randomization object
variable Src1, Src2 : integer ;
begin
ACov.SetName("TbAlu_ConstrainedRandom") ;
ACov.AddCross( GenBin(0,7), GenBin(0,7) );
loop
Src1 := RV.RandInt(0, 7) ;
Src2 := RV.RandInt(0, 7) ;
DoAluOp(TRec, Src1, Src2) ;
ACov.ICover( ( Src1, Src2 ) ) ;
exit when ACov.IsCovered ;
end loop ;
ACov.WriteBin ;
ReportAlerts ;
std.env.stop ;
end process ;
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
ACov.AddCross( GenBin(0,7), GenBin(0,7) );
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
TestProc : process
begin
for i in 0 to 7 loop
for j in 0 to 7 loop
if i /= j then
-- non-diagonal
ACov.AddCross(2, GenBin(i), GenBin(j)) ;
else
-- diagonal
ACov.AddCross(4, GenBin(i), GenBin(j)) ;
end if ;
...
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
architecture Test3 of tb is
shared variable ACov : CovPType ; -- Cov Object
begin
CollectCov : process
variable Src1, Src2 : integer ;
begin
SetAlertLogName("IntelligentCov1") ;
ACov.AddCross( GenBin(0,7), GenBin(0,7) );
loop
(Src1, Src2) := ACov.RandCovPoint ;
ACov.ICover( (Src1, Src2) ) ;
DoAluOp(TRec, Src1, Src2) ;
exit when ACov.IsCovered ;
end loop ;
ACov.WriteBin ;
ReportAlerts ;
std.env.stop ;
end process ;
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
while not ACov.IsCovered loop
(Src1, Src2) := ACov.RandCovPoint ;
if Src1 /= Src2 then
DoAluOp(TRec, Src1, Src2) ;
ACov.ICover( (Src1, Src2) ) ;
else
-- Do previous and following diagional
DoAluOp(TRec, (Src1-1) mod 8, (Src1-1) mod 8) ;
DoAluOp(TRec, Src1, Src1 ) ;
DoAluOp(TRec, (Src1+1) mod 8, (Src1+1) mod 8) ;
-- Can either record all or select items
ACov.ICover( (Src1, Src1) ) ;
end if ;
end loop ;
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
StimCov.AddBins( 70, NORMAL ) ;
StimCov.AddBins( 10, PARITY ) ;
StimCov.AddBins( . . . ) ;
. . .
loop
iOperation := StimCov.RandCovPoint ;
case iOperation is
when 1 => . . . -- Nominal
when 3 => . . . -- Parity
. . .
end case ;
UartRxScoreboard.Push( (Data, Operation) ) ;
UartSend(UartTxRec, Data, Operation) ;
StimCov.Icover(iOperation) ;
exit when StimCov.IsCovered ;
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
SetAlertLogName("Test_Uart_Rx1") ;
signal CpuID : AlertLogIDType ;
signal DataErrID : AlertLogIDType ;
. . .
CpuID <= GetAlertLogID("Cpu_1") ;
DataErrID <= GetAlertLogID("Cpu_1 Data Error", CpuID);
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
Alert (CpuID, "Illegal State") ;
AlertIfNot(CpuID, ReadValid, "Read Failed", FAILURE) ;
AlertIfDiff(CpuID, "./File1.txt", "./File2.txt") ;
%% Alert ERROR In Cpu_1, Illegal State at 5000 ns
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
Log("Test 1 Starting") ;
Log(CpuID, "Entered Hold State", DEBUG) ;
%% Log ALWAYS Test 1 Starting at 1770 ns
%% Log DEBUG In Cpu_1, Entered Hold State at 31000 ns
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
AffirmIf(CpuID, Data = Expect, "Data: " & to_string(Data),
" /= Expected: " & to_string(Expect)) ;
%% Alert ERROR In Cpu_1, Data: 5 /= Expected: 6 at ... ns
%% Log PASSED In Cpu_1, Data: 5 at 2150 ns
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
ReportAlerts ;
%% DONE FAILED Test_UartRx_1 Total Error(s) = 10 Failures: 0
Errors: 10 Warnings: 0 at 100100100 ns
%% DONE FAILED Test_UartRx_1 Total Error(s) = 10 Failures: 0
Errors: 10 Warnings: 0 at 100100100 ns
%% Default Failures: 0 Errors: 2 Warnings: 0
%% OSVVM Failures: 0 Errors: 0 Warnings: 0
%% Cpu_1 Failures: 0 Errors: 5 Warnings: 0
%% Cpu_1 Data Error Failures: 0 Errors: 4 Warnings: 0
%% Cpu_1 Protocol Error Failures: 0 Errors: 1 Warnings: 0
%% UartTx_1 Failures: 0 Errors: 0 Warnings: 0
%% DONE PASSED Test_UartRx_1 at 100100100 ns
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
SetAlertEnable(WARNING, FALSE) ; -- For all IDs
SetAlertEnable(CpuID, WARNING, FALSE) ; -- For CpuID
SetAlertStopCount(ERROR, 20) ; -- For all IDs
SetAlertStopCount(CpuID, ERROR, 20) ; -- CpuID
ClearAlerts ;
SetLogEnable(PASSED, TRUE) ; -- For all models
SetLogEnable(CpuID, DEBUG, TRUE) ; -- For CpuID
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
TranscriptOpen("./results/test1.txt") ;
TranscriptClose ;
SetTranscriptMirror(TRUE) ; -- TRUE is the default
print("A String") ; -- Direct to file, newline added
print("") ; -- Print a blank line
writeline( WriteBuf ) ; -- Using textio
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
GenerateProc : process
begin
SB.Push(X"10") ;
UartSend(TRec, X"10") ;
SB.Push(X"11") ;
UartSend(TRec, X"11") ;
SB.Push(X"12") ;
UartSend(TRec, X"12") ;
. . .
Done <= TRUE ;
wait ;
end process GenerateProc ;
ReceiveProc : process
variable ExpectD, RcvD :
std_logic_vector(7 downto 0);
begin
SetAlertLogName("SB_UART");
while not Done loop
UartGet(RRec, RcvD) ;
SB.Check(RcvD) ;
end loop ;
ReportAlerts ;
end process ReceiveProc ;
shared variable SB : ScoreboardPType ;
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
type MemoryPType is protected
procedure MemInit ( AddrWidth, DataWidth : in integer ) ;
procedure MemWrite ( Addr, Data : in std_logic_vector ) ;
impure function MemRead ( Addr : in std_logic_vector )
return std_logic_vector ;
procedure FileReadH (FileName : string) ;
procedure FileWriteH (FileName : string) ;
. . .
end protected MemoryPType ;
SynthWorks
Copyright © 2016 SynthWorks Design Inc.
SynthWorks
Copyright © 2016 SynthWorks Design Inc.

Más contenido relacionado

La actualidad más candente

Scale17x buffer overflows
Scale17x buffer overflowsScale17x buffer overflows
Scale17x buffer overflowsjohseg
 
DDAA FPGA - Multiplexor De Numeros en Display 7 Segmentos En Tiempo
DDAA   FPGA - Multiplexor De Numeros en Display 7 Segmentos En TiempoDDAA   FPGA - Multiplexor De Numeros en Display 7 Segmentos En Tiempo
DDAA FPGA - Multiplexor De Numeros en Display 7 Segmentos En TiempoFernando Marcos Marcos
 
Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"Yulia Tsisyk
 
Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"
Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"
Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"Yulia Tsisyk
 
[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit Automation[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit AutomationMoabi.com
 
Современные технологии и инструменты анализа вредоносного ПО_PHDays_2017_Pisk...
Современные технологии и инструменты анализа вредоносного ПО_PHDays_2017_Pisk...Современные технологии и инструменты анализа вредоносного ПО_PHDays_2017_Pisk...
Современные технологии и инструменты анализа вредоносного ПО_PHDays_2017_Pisk...Ivan Piskunov
 
[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...
[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...
[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...Asuka Nakajima
 
深入淺出C語言
深入淺出C語言深入淺出C語言
深入淺出C語言Simen Li
 
[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory Analysis[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory AnalysisMoabi.com
 
Make ARM Shellcode Great Again - HITB2018PEK
Make ARM Shellcode Great Again - HITB2018PEKMake ARM Shellcode Great Again - HITB2018PEK
Make ARM Shellcode Great Again - HITB2018PEKSaumil Shah
 
Network security mannual (2)
Network security mannual (2)Network security mannual (2)
Network security mannual (2)Vivek Kumar Sinha
 
Unit Testing: Special Cases
Unit Testing: Special CasesUnit Testing: Special Cases
Unit Testing: Special CasesCiklum Ukraine
 
Network security Lab manual
Network security Lab manual Network security Lab manual
Network security Lab manual Vivek Kumar Sinha
 
The Ring programming language version 1.5.1 book - Part 172 of 180
The Ring programming language version 1.5.1 book - Part 172 of 180 The Ring programming language version 1.5.1 book - Part 172 of 180
The Ring programming language version 1.5.1 book - Part 172 of 180 Mahmoud Samir Fayed
 
Schrödinger's ARM Assembly
Schrödinger's ARM AssemblySchrödinger's ARM Assembly
Schrödinger's ARM AssemblySaumil Shah
 
Kernel Recipes 2018 - New GPIO interface for linux user space - Bartosz Golas...
Kernel Recipes 2018 - New GPIO interface for linux user space - Bartosz Golas...Kernel Recipes 2018 - New GPIO interface for linux user space - Bartosz Golas...
Kernel Recipes 2018 - New GPIO interface for linux user space - Bartosz Golas...Anne Nicolas
 
Non-blocking synchronization — what is it and why we (don't?) need it
Non-blocking synchronization — what is it and why we (don't?) need itNon-blocking synchronization — what is it and why we (don't?) need it
Non-blocking synchronization — what is it and why we (don't?) need itAlexey Fyodorov
 
Introduction to Debuggers
Introduction to DebuggersIntroduction to Debuggers
Introduction to DebuggersSaumil Shah
 
ARM Polyglot Shellcode - HITB2019AMS
ARM Polyglot Shellcode - HITB2019AMSARM Polyglot Shellcode - HITB2019AMS
ARM Polyglot Shellcode - HITB2019AMSSaumil Shah
 

La actualidad más candente (20)

Scale17x buffer overflows
Scale17x buffer overflowsScale17x buffer overflows
Scale17x buffer overflows
 
DDAA FPGA - Multiplexor De Numeros en Display 7 Segmentos En Tiempo
DDAA   FPGA - Multiplexor De Numeros en Display 7 Segmentos En TiempoDDAA   FPGA - Multiplexor De Numeros en Display 7 Segmentos En Tiempo
DDAA FPGA - Multiplexor De Numeros en Display 7 Segmentos En Tiempo
 
Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"
 
Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"
Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"
Рахманов Александр "Что полезного в разборе дампов для .NET-разработчиков?"
 
[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit Automation[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit Automation
 
Современные технологии и инструменты анализа вредоносного ПО_PHDays_2017_Pisk...
Современные технологии и инструменты анализа вредоносного ПО_PHDays_2017_Pisk...Современные технологии и инструменты анализа вредоносного ПО_PHDays_2017_Pisk...
Современные технологии и инструменты анализа вредоносного ПО_PHDays_2017_Pisk...
 
[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...
[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...
[ROOTCON13] Pilot Study on Semi-Automated Patch Diffing by Applying Machine-L...
 
深入淺出C語言
深入淺出C語言深入淺出C語言
深入淺出C語言
 
[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory Analysis[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory Analysis
 
Make ARM Shellcode Great Again - HITB2018PEK
Make ARM Shellcode Great Again - HITB2018PEKMake ARM Shellcode Great Again - HITB2018PEK
Make ARM Shellcode Great Again - HITB2018PEK
 
Network security mannual (2)
Network security mannual (2)Network security mannual (2)
Network security mannual (2)
 
Unit Testing: Special Cases
Unit Testing: Special CasesUnit Testing: Special Cases
Unit Testing: Special Cases
 
Network security Lab manual
Network security Lab manual Network security Lab manual
Network security Lab manual
 
The Ring programming language version 1.5.1 book - Part 172 of 180
The Ring programming language version 1.5.1 book - Part 172 of 180 The Ring programming language version 1.5.1 book - Part 172 of 180
The Ring programming language version 1.5.1 book - Part 172 of 180
 
Schrödinger's ARM Assembly
Schrödinger's ARM AssemblySchrödinger's ARM Assembly
Schrödinger's ARM Assembly
 
Kernel Recipes 2018 - New GPIO interface for linux user space - Bartosz Golas...
Kernel Recipes 2018 - New GPIO interface for linux user space - Bartosz Golas...Kernel Recipes 2018 - New GPIO interface for linux user space - Bartosz Golas...
Kernel Recipes 2018 - New GPIO interface for linux user space - Bartosz Golas...
 
Non-blocking synchronization — what is it and why we (don't?) need it
Non-blocking synchronization — what is it and why we (don't?) need itNon-blocking synchronization — what is it and why we (don't?) need it
Non-blocking synchronization — what is it and why we (don't?) need it
 
IT6712 lab manual
IT6712 lab manualIT6712 lab manual
IT6712 lab manual
 
Introduction to Debuggers
Introduction to DebuggersIntroduction to Debuggers
Introduction to Debuggers
 
ARM Polyglot Shellcode - HITB2019AMS
ARM Polyglot Shellcode - HITB2019AMSARM Polyglot Shellcode - HITB2019AMS
ARM Polyglot Shellcode - HITB2019AMS
 

Similar a Verifikation - Metoder og Libraries

XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...The Linux Foundation
 
Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++Sergey Platonov
 
Locks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael BarkerLocks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael BarkerJAX London
 
Lock? We don't need no stinkin' locks!
Lock? We don't need no stinkin' locks!Lock? We don't need no stinkin' locks!
Lock? We don't need no stinkin' locks!Michael Barker
 
RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析
RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析
RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析Mr. Vengineer
 
Эксплуатируем неэксплуатируемые уязвимости SAP
Эксплуатируем неэксплуатируемые уязвимости SAPЭксплуатируем неэксплуатируемые уязвимости SAP
Эксплуатируем неэксплуатируемые уязвимости SAPPositive Hack Days
 
Getting access to the SAP server via SAP Management Console
Getting access to the SAP server via SAP Management ConsoleGetting access to the SAP server via SAP Management Console
Getting access to the SAP server via SAP Management ConsoleDmitry Iudin
 
The CppCat Analyzer Checks TortoiseGit
The CppCat Analyzer Checks TortoiseGitThe CppCat Analyzer Checks TortoiseGit
The CppCat Analyzer Checks TortoiseGitAndrey Karpov
 
jQuery Mobile & PhoneGap
jQuery Mobile & PhoneGapjQuery Mobile & PhoneGap
jQuery Mobile & PhoneGapSwiip
 
[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin - SAP, dos, dos, race condi...
[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin -  SAP, dos, dos, race condi...[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin -  SAP, dos, dos, race condi...
[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin - SAP, dos, dos, race condi...PROIDEA
 
SSL Failing, Sharing, and Scheduling
SSL Failing, Sharing, and SchedulingSSL Failing, Sharing, and Scheduling
SSL Failing, Sharing, and SchedulingDavid Evans
 
Modeling an Embedded Device for PSpice Simulation
Modeling an Embedded Device for PSpice SimulationModeling an Embedded Device for PSpice Simulation
Modeling an Embedded Device for PSpice SimulationEMA Design Automation
 
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...Positive Hack Days
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the wayOleg Podsechin
 
Online test program generator for RISC-V processors
Online test program generator for RISC-V processorsOnline test program generator for RISC-V processors
Online test program generator for RISC-V processorsRISC-V International
 

Similar a Verifikation - Metoder og Libraries (20)

XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
 
Marat-Slides
Marat-SlidesMarat-Slides
Marat-Slides
 
3
33
3
 
Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++
 
Locks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael BarkerLocks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael Barker
 
Lock? We don't need no stinkin' locks!
Lock? We don't need no stinkin' locks!Lock? We don't need no stinkin' locks!
Lock? We don't need no stinkin' locks!
 
RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析
RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析
RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析
 
Эксплуатируем неэксплуатируемые уязвимости SAP
Эксплуатируем неэксплуатируемые уязвимости SAPЭксплуатируем неэксплуатируемые уязвимости SAP
Эксплуатируем неэксплуатируемые уязвимости SAP
 
Getting access to the SAP server via SAP Management Console
Getting access to the SAP server via SAP Management ConsoleGetting access to the SAP server via SAP Management Console
Getting access to the SAP server via SAP Management Console
 
Tierney bq207
Tierney bq207Tierney bq207
Tierney bq207
 
The CppCat Analyzer Checks TortoiseGit
The CppCat Analyzer Checks TortoiseGitThe CppCat Analyzer Checks TortoiseGit
The CppCat Analyzer Checks TortoiseGit
 
jQuery Mobile & PhoneGap
jQuery Mobile & PhoneGapjQuery Mobile & PhoneGap
jQuery Mobile & PhoneGap
 
Qemu JIT Code Generator and System Emulation
Qemu JIT Code Generator and System EmulationQemu JIT Code Generator and System Emulation
Qemu JIT Code Generator and System Emulation
 
[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin - SAP, dos, dos, race condi...
[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin -  SAP, dos, dos, race condi...[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin -  SAP, dos, dos, race condi...
[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin - SAP, dos, dos, race condi...
 
bluespec talk
bluespec talkbluespec talk
bluespec talk
 
SSL Failing, Sharing, and Scheduling
SSL Failing, Sharing, and SchedulingSSL Failing, Sharing, and Scheduling
SSL Failing, Sharing, and Scheduling
 
Modeling an Embedded Device for PSpice Simulation
Modeling an Embedded Device for PSpice SimulationModeling an Embedded Device for PSpice Simulation
Modeling an Embedded Device for PSpice Simulation
 
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the way
 
Online test program generator for RISC-V processors
Online test program generator for RISC-V processorsOnline test program generator for RISC-V processors
Online test program generator for RISC-V processors
 

Más de InfinIT - Innovationsnetværket for it

Más de InfinIT - Innovationsnetværket for it (20)

Erfaringer med-c kurt-noermark
Erfaringer med-c kurt-noermarkErfaringer med-c kurt-noermark
Erfaringer med-c kurt-noermark
 
Object orientering, test driven development og c
Object orientering, test driven development og cObject orientering, test driven development og c
Object orientering, test driven development og c
 
Embedded softwaredevelopment hcs
Embedded softwaredevelopment hcsEmbedded softwaredevelopment hcs
Embedded softwaredevelopment hcs
 
C og c++-jens lund jensen
C og c++-jens lund jensenC og c++-jens lund jensen
C og c++-jens lund jensen
 
201811xx foredrag c_cpp
201811xx foredrag c_cpp201811xx foredrag c_cpp
201811xx foredrag c_cpp
 
C som-programmeringssprog-bt
C som-programmeringssprog-btC som-programmeringssprog-bt
C som-programmeringssprog-bt
 
Infinit seminar 060918
Infinit seminar 060918Infinit seminar 060918
Infinit seminar 060918
 
DCR solutions
DCR solutionsDCR solutions
DCR solutions
 
Not your grandfathers BPM
Not your grandfathers BPMNot your grandfathers BPM
Not your grandfathers BPM
 
Kmd workzone - an evolutionary approach to revolution
Kmd workzone - an evolutionary approach to revolutionKmd workzone - an evolutionary approach to revolution
Kmd workzone - an evolutionary approach to revolution
 
EcoKnow - oplæg
EcoKnow - oplægEcoKnow - oplæg
EcoKnow - oplæg
 
Martin Wickins Chatbots i fronten
Martin Wickins Chatbots i frontenMartin Wickins Chatbots i fronten
Martin Wickins Chatbots i fronten
 
Marie Fenger ai kundeservice
Marie Fenger ai kundeserviceMarie Fenger ai kundeservice
Marie Fenger ai kundeservice
 
Mads Kaysen SupWiz
Mads Kaysen SupWizMads Kaysen SupWiz
Mads Kaysen SupWiz
 
Leif Howalt NNIT Service Support Center
Leif Howalt NNIT Service Support CenterLeif Howalt NNIT Service Support Center
Leif Howalt NNIT Service Support Center
 
Jan Neerbek NLP og Chatbots
Jan Neerbek NLP og ChatbotsJan Neerbek NLP og Chatbots
Jan Neerbek NLP og Chatbots
 
Anders Soegaard NLP for Customer Support
Anders Soegaard NLP for Customer SupportAnders Soegaard NLP for Customer Support
Anders Soegaard NLP for Customer Support
 
Stephen Alstrup infinit august 2018
Stephen Alstrup infinit august 2018Stephen Alstrup infinit august 2018
Stephen Alstrup infinit august 2018
 
Innovation og værdiskabelse i it-projekter
Innovation og værdiskabelse i it-projekterInnovation og værdiskabelse i it-projekter
Innovation og værdiskabelse i it-projekter
 
Rokoko infin it presentation
Rokoko infin it presentation Rokoko infin it presentation
Rokoko infin it presentation
 

Último

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Último (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Verifikation - Metoder og Libraries

  • 1. SynthWorks Presented by Martin Rønne, MR Logic Slides prepared by Jim Lewis, jim@SynthWorks.com SynthWorks Copyright © 2016 SynthWorks Design Inc. Copyright © 2017 by SynthWorks Design Inc. Reproduction of this entire document in whole for individual usage is permitted. All other rights reserved. In particular, without express written permission of SynthWorks Design Inc, You may not alter, transform, or build upon this work, You may not use any material from this guide in a group presentation, tutorial, training, or classroom You must include this page in any printed copy of this document. This material is derived from SynthWorks' Advanced VHDL Testbenches and Verification class This material is updated from time to time and the latest copy of this is available at http://www.SynthWorks.com/papers Contact Information Jim Lewis, President SynthWorks Design Inc 11898 SW 128th Avenue Tigard, Oregon 97223 503-590-4787 jim@SynthWorks.com www.SynthWorks.com
  • 2. SynthWorks Copyright © 2016 SynthWorks Design Inc. SynthWorks Copyright © 2016 SynthWorks Design Inc.
  • 3. SynthWorks Copyright © 2016 SynthWorks Design Inc. UartTbTxProc : process begin . . . UartSend(UartTxRec, X"4A") ; UartSend(UartTxRec, X"4B") ; . . . SynthWorks Copyright © 2016 SynthWorks Design Inc.
  • 4. SynthWorks Copyright © 2016 SynthWorks Design Inc. architecture UartTx1 of TestCtrl is . . . begin ControlProc : process begin . . . WaitForBarrier(TestDone, 5 ms) ; ReportAlerts ; std.env.stop; end process ; CpuTestProc : process begin wait until nReset = '1' ; CpuWrite(. . .) ; Toggle(CpuRdy); . . . WaitForBarrier(TestDone) ; end process ; UartTbTxProc : process begin WaitForToggle(CpuRdy); UartSend(. . .) ; . . . WaitForBarrier(TestDone) ; end process ; . . . SynthWorks Copyright © 2016 SynthWorks Design Inc. UartSend(...) type CpuRecType is record Rdy : std_logic_max ; Ack : std_logic_max ; Data : unsigned_max(7 downto 0) ; ErrMode : unsigned_max(2 downto 0) ; end record ;
  • 5. SynthWorks Copyright © 2016 SynthWorks Design Inc. procedure UartSend ( . . . ) is begin -- Copy Transaction to Record UartTxRec.Data <= . . . ; UartTxRec.ErrMode <= . . . ; -- Handshake with UartTx RequestTransaction(. . .); -- Copy results from Record . . . end UartSend ; entity UartTx is port (. . .) ; end UartTx ; architecture Model of UartTx is . . . begin . . . UartTxFunction : process -- declarations not shown begin -- Handshake with UartSend WaitForTransaction(. . .); -- Create UART waveforms . . . end process ; end Model ; SynthWorks Copyright © 2016 SynthWorks Design Inc.
  • 6. SynthWorks Copyright © 2016 SynthWorks Design Inc. Data1 := RV.RandInt(Min => 0, Max => 15) ; Data2 := RV.RandInt(0, 15, (5,11) ) ; -- except 5 & 11 Data3 := RV.RandInt( (1,2,3,5,7,11) ) ; Data4 := RV.RandInt( (1,2,3,5,7,11), (5,11) ) ; . . . -- ((val1, wt1), (val2, wt2), ...) Data6 := RV.DistValInt( ((1,7), (3,2), (5, 1)) ) ; Data5 := RV.DistInt ( (7, 2, 1) ) ; SynthWorks Copyright © 2016 SynthWorks Design Inc. variable RV : RandomPType ; . . . StimGen: while TestActive loop case RV.DistInt( (70, 10, 10, 5, 5) ) is when 0 => -- Nominal case 70% Operation := UARTTB_NO_ERROR ; Data := RV.RandSlv(0, 255, Data'length) ; when 1 => -- Parity Error 10% Operation := UARTTB_PARITY_ERROR ; Data := RV.RandSlv(0, 255, Data'length) ; when . . . -- (2, 3, and 4) end case ; UartRxScoreboard.Push( (Data, Operation) ) ; UartSend(UartTxRec, Data, Operation) ; . . .
  • 7. SynthWorks Copyright © 2016 SynthWorks Design Inc. SynthWorks Copyright © 2016 SynthWorks Design Inc. function GenBin ( . . . ) return CovBinType ; type CovPType is protected procedure AddBins ( CovBin : CovBinType ) ; procedure AddCross( Bin1, Bin2, ... : CovBinType ) ; procedure ICover ( val : integer ) ; procedure ICover ( val : integer_vector ) ; impure function IsCovered return boolean ; procedure WriteBin ; procedure WriteCovHoles ; procedure ReadCovDb ( FileName : string ) ; procedure WriteCovDb ( FileName : string; ... ) ; . . . end protected CovPType ;
  • 8. SynthWorks Copyright © 2016 SynthWorks Design Inc. SynthWorks Copyright © 2016 SynthWorks Design Inc. architecture Test3 of tb is shared variable ACov : CovPType ; begin CollectCov : process variable RV : RandomPType ; -- randomization object variable Src1, Src2 : integer ; begin ACov.SetName("TbAlu_ConstrainedRandom") ; ACov.AddCross( GenBin(0,7), GenBin(0,7) ); loop Src1 := RV.RandInt(0, 7) ; Src2 := RV.RandInt(0, 7) ; DoAluOp(TRec, Src1, Src2) ; ACov.ICover( ( Src1, Src2 ) ) ; exit when ACov.IsCovered ; end loop ; ACov.WriteBin ; ReportAlerts ; std.env.stop ; end process ;
  • 9. SynthWorks Copyright © 2016 SynthWorks Design Inc. ACov.AddCross( GenBin(0,7), GenBin(0,7) ); SynthWorks Copyright © 2016 SynthWorks Design Inc. TestProc : process begin for i in 0 to 7 loop for j in 0 to 7 loop if i /= j then -- non-diagonal ACov.AddCross(2, GenBin(i), GenBin(j)) ; else -- diagonal ACov.AddCross(4, GenBin(i), GenBin(j)) ; end if ; ...
  • 10. SynthWorks Copyright © 2016 SynthWorks Design Inc. SynthWorks Copyright © 2016 SynthWorks Design Inc.
  • 11. SynthWorks Copyright © 2016 SynthWorks Design Inc. architecture Test3 of tb is shared variable ACov : CovPType ; -- Cov Object begin CollectCov : process variable Src1, Src2 : integer ; begin SetAlertLogName("IntelligentCov1") ; ACov.AddCross( GenBin(0,7), GenBin(0,7) ); loop (Src1, Src2) := ACov.RandCovPoint ; ACov.ICover( (Src1, Src2) ) ; DoAluOp(TRec, Src1, Src2) ; exit when ACov.IsCovered ; end loop ; ACov.WriteBin ; ReportAlerts ; std.env.stop ; end process ; SynthWorks Copyright © 2016 SynthWorks Design Inc. while not ACov.IsCovered loop (Src1, Src2) := ACov.RandCovPoint ; if Src1 /= Src2 then DoAluOp(TRec, Src1, Src2) ; ACov.ICover( (Src1, Src2) ) ; else -- Do previous and following diagional DoAluOp(TRec, (Src1-1) mod 8, (Src1-1) mod 8) ; DoAluOp(TRec, Src1, Src1 ) ; DoAluOp(TRec, (Src1+1) mod 8, (Src1+1) mod 8) ; -- Can either record all or select items ACov.ICover( (Src1, Src1) ) ; end if ; end loop ;
  • 12. SynthWorks Copyright © 2016 SynthWorks Design Inc. StimCov.AddBins( 70, NORMAL ) ; StimCov.AddBins( 10, PARITY ) ; StimCov.AddBins( . . . ) ; . . . loop iOperation := StimCov.RandCovPoint ; case iOperation is when 1 => . . . -- Nominal when 3 => . . . -- Parity . . . end case ; UartRxScoreboard.Push( (Data, Operation) ) ; UartSend(UartTxRec, Data, Operation) ; StimCov.Icover(iOperation) ; exit when StimCov.IsCovered ; SynthWorks Copyright © 2016 SynthWorks Design Inc.
  • 13. SynthWorks Copyright © 2016 SynthWorks Design Inc. SetAlertLogName("Test_Uart_Rx1") ; signal CpuID : AlertLogIDType ; signal DataErrID : AlertLogIDType ; . . . CpuID <= GetAlertLogID("Cpu_1") ; DataErrID <= GetAlertLogID("Cpu_1 Data Error", CpuID); SynthWorks Copyright © 2016 SynthWorks Design Inc. Alert (CpuID, "Illegal State") ; AlertIfNot(CpuID, ReadValid, "Read Failed", FAILURE) ; AlertIfDiff(CpuID, "./File1.txt", "./File2.txt") ; %% Alert ERROR In Cpu_1, Illegal State at 5000 ns
  • 14. SynthWorks Copyright © 2016 SynthWorks Design Inc. Log("Test 1 Starting") ; Log(CpuID, "Entered Hold State", DEBUG) ; %% Log ALWAYS Test 1 Starting at 1770 ns %% Log DEBUG In Cpu_1, Entered Hold State at 31000 ns SynthWorks Copyright © 2016 SynthWorks Design Inc. AffirmIf(CpuID, Data = Expect, "Data: " & to_string(Data), " /= Expected: " & to_string(Expect)) ; %% Alert ERROR In Cpu_1, Data: 5 /= Expected: 6 at ... ns %% Log PASSED In Cpu_1, Data: 5 at 2150 ns
  • 15. SynthWorks Copyright © 2016 SynthWorks Design Inc. ReportAlerts ; %% DONE FAILED Test_UartRx_1 Total Error(s) = 10 Failures: 0 Errors: 10 Warnings: 0 at 100100100 ns %% DONE FAILED Test_UartRx_1 Total Error(s) = 10 Failures: 0 Errors: 10 Warnings: 0 at 100100100 ns %% Default Failures: 0 Errors: 2 Warnings: 0 %% OSVVM Failures: 0 Errors: 0 Warnings: 0 %% Cpu_1 Failures: 0 Errors: 5 Warnings: 0 %% Cpu_1 Data Error Failures: 0 Errors: 4 Warnings: 0 %% Cpu_1 Protocol Error Failures: 0 Errors: 1 Warnings: 0 %% UartTx_1 Failures: 0 Errors: 0 Warnings: 0 %% DONE PASSED Test_UartRx_1 at 100100100 ns SynthWorks Copyright © 2016 SynthWorks Design Inc. SetAlertEnable(WARNING, FALSE) ; -- For all IDs SetAlertEnable(CpuID, WARNING, FALSE) ; -- For CpuID SetAlertStopCount(ERROR, 20) ; -- For all IDs SetAlertStopCount(CpuID, ERROR, 20) ; -- CpuID ClearAlerts ; SetLogEnable(PASSED, TRUE) ; -- For all models SetLogEnable(CpuID, DEBUG, TRUE) ; -- For CpuID
  • 16. SynthWorks Copyright © 2016 SynthWorks Design Inc. TranscriptOpen("./results/test1.txt") ; TranscriptClose ; SetTranscriptMirror(TRUE) ; -- TRUE is the default print("A String") ; -- Direct to file, newline added print("") ; -- Print a blank line writeline( WriteBuf ) ; -- Using textio SynthWorks Copyright © 2016 SynthWorks Design Inc.
  • 17. SynthWorks Copyright © 2016 SynthWorks Design Inc. GenerateProc : process begin SB.Push(X"10") ; UartSend(TRec, X"10") ; SB.Push(X"11") ; UartSend(TRec, X"11") ; SB.Push(X"12") ; UartSend(TRec, X"12") ; . . . Done <= TRUE ; wait ; end process GenerateProc ; ReceiveProc : process variable ExpectD, RcvD : std_logic_vector(7 downto 0); begin SetAlertLogName("SB_UART"); while not Done loop UartGet(RRec, RcvD) ; SB.Check(RcvD) ; end loop ; ReportAlerts ; end process ReceiveProc ; shared variable SB : ScoreboardPType ; SynthWorks Copyright © 2016 SynthWorks Design Inc. type MemoryPType is protected procedure MemInit ( AddrWidth, DataWidth : in integer ) ; procedure MemWrite ( Addr, Data : in std_logic_vector ) ; impure function MemRead ( Addr : in std_logic_vector ) return std_logic_vector ; procedure FileReadH (FileName : string) ; procedure FileWriteH (FileName : string) ; . . . end protected MemoryPType ;
  • 18. SynthWorks Copyright © 2016 SynthWorks Design Inc. SynthWorks Copyright © 2016 SynthWorks Design Inc.