PROLEAD
A Probing-Based Leakage Detection Tool for Hardware and Software
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
Probing.hpp File Reference
#include "Software/Definitions.hpp"
#include "Software/mulator/emulator.h"
#include "Software/Operators.hpp"
#include <algorithm>
#include <cmath>
#include <numeric>

Go to the source code of this file.

Namespaces

namespace  Software
 
namespace  Software::Probing
 

Macros

#define PROBING_HPP
 
#define ID_OFFSET   23
 
#define ID_MASK   0x7800000
 
#define REG1_OFFSET   18
 
#define REG1_MASK   0x7c0000
 
#define REG2_OFFSET   13
 
#define REG2_MASK   0x3e000
 
#define BIT_OFFSET   8
 
#define BIT_MASK   0x1f00
 
#define CYCLE_OFFSET   32
 
#define EXTENSION_MASK   0xff
 
#define DEPENDENCY_OFFSET   27
 
#define DEPENDENCY_MASK   0x78000000
 

Functions

void Software::Probing::GetProbingSets (Software::ThreadSimulationStruct &ThreadSimulation, SettingsStruct &Settings, Software::TestStruct &Test, std::vector< std::tuple< uint32_t, uint32_t > > &OrderOverTwoCombination, std::vector< std::vector< uint32_t > > &ProbeInfoToStandardProbe, uint64_t SimulationIndex)
 Generate probing sets from single probes, does it for any order and univariate and multivariate.
 
void Software::Probing::GetMultivariateProbingSets (std::vector< std::vector< Software::ProbesStruct > > &OneSimulationStandardProbes, SettingsStruct &Settings, Software::TestStruct &Test, std::vector< std::tuple< uint32_t, uint32_t > > &OrderOverTwoCombination, std::vector< std::vector< uint32_t > > &ProbeInfoToStandardProbe, uint32_t ThreadIndex, uint32_t SimulationIndex)
 Get the Multivariate Probing Sets object.
 
bool Software::Probing::InDistance (Software::SettingsStruct &Settings, std::vector< Software::ProbesStruct > &ProbingSet)
 
uint32_t Software::Probing::MemoryConsumption ()
 
void Software::Probing::CreateNormalProbe (std::vector< uint8_t > &NormalProbesRegister, std::vector< Software::ProbesStruct > &StandardProbes, std::vector< std::vector< uint8_t > > &ProbeValueRegister, uint32_t &ProbeIndex, uint64_t &ProbeInfo, uint32_t RegisterTransitionCycle, uint32_t InstrNr, uint64_t SimulationIdx, uint32_t DestinationRegisterValue, uint8_t RegNr)
 Create a Normal Probe object.
 
void Software::Probing::CreateHorizontalProbe (std::vector< Software::ProbesStruct > &StandardProbes, uint32_t RegisterTransitionCycle, uint8_t ExtensionSize, uint32_t &ProbeIndex, uint32_t InstrNr, uint8_t RegisterNumber)
 Create a Horizontal Probe.
 
void Software::Probing::CreateLargeVerticalProbe (std::vector< Software::ProbesStruct > &StandardProbes, uint64_t &ProbeInfo, uint32_t &ProbeIndex, uint32_t TransCycleRegNr, uint32_t TransCyclePartnerRegNr)
 Create a Large Vertical Probe.
 
void Software::Probing::CreateSmallVerticalProbe (std::vector< Software::ProbesStruct > &StandardProbes, uint64_t &ProbeInfo, uint32_t &ProbeIndex, uint32_t TransCycleRegNr, uint32_t CyclePartnerRegNr)
 Create a Small Vertical Probe.
 
void Software::Probing::CreateLargeFullHorizontalProbe (std::vector< Software::ProbesStruct > &StandardProbes, uint64_t &ProbeInfo, uint32_t &ProbeIndex, uint32_t TransCycleRegNr, uint32_t TransCyclePartnerRegNr)
 Create a Large Full Horizontal Probe.
 
void Software::Probing::CreateSmallFullHorizontalProbe (std::vector< Software::ProbesStruct > &StandardProbes, uint64_t &ProbeInfo, uint32_t &ProbeIndex, uint32_t TransCycleRegNr, uint32_t CyclePartnerRegNr)
 Create a Small Full Horizontal Probe.
 
void Software::Probing::CreateLargeFullVerticalProbe (std::vector< Software::ProbesStruct > &StandardProbes, std::vector< uint8_t > &FullVerticalProbes, uint8_t BitIdx, uint8_t RegNr, uint32_t &ProbeIndex, uint64_t ProbeInfo, std::vector< uint32_t > &RegisterValues, uint32_t TransValueRegNr, uint32_t TransValuePC, uint32_t TransValuePSR)
 Create a Large Full Vertical Probe.
 
void Software::Probing::CreateSmallFullVerticalProbe (std::vector< Software::ProbesStruct > &StandardProbes, std::vector< uint8_t > &FullVerticalProbes, uint8_t BitIdx, uint8_t RegNr1, uint8_t RegNr2, uint32_t &ProbeIndex, uint64_t ProbeInfo, std::vector< uint32_t > &RegisterValues, uint32_t TransValueReg1, uint32_t TransValueReg2)
 Create a Small Full Vertical Probe object.
 
void Software::Probing::CreateOneRegisterOnlyFullVerticalProbe (std::vector< Software::ProbesStruct > &StandardProbes, std::vector< uint8_t > &FullVerticalProbes, uint8_t BitIdx, uint8_t RegNr1, uint32_t &ProbeIndex, uint64_t ProbeInfo, std::vector< uint32_t > &RegisterValues, uint32_t TransValueRegNr)
 Create a One Register Only Full Vertical Probe object.
 
void Software::Probing::CreateDSPLargeFullVerticalProbe (std::vector< Software::ProbesStruct > &StandardProbes, std::vector< uint8_t > &FullVerticalProbes, uint8_t BitIdx, uint8_t low_RegNr, uint8_t high_RegNr, uint32_t &ProbeIndex, uint64_t ProbeInfo, std::vector< uint32_t > &RegisterValues, uint32_t TransValueLowRegNr, uint32_t TransValueHighRegNr, uint32_t TransValuePC, uint32_t TransValuePSR)
 
void Software::Probing::CreateDSPSmallFullVerticalProbe (std::vector< Software::ProbesStruct > &StandardProbes, std::vector< uint8_t > &FullVerticalProbes, uint8_t BitIdx, uint8_t low_RegNr, uint8_t high_RegNr, uint32_t &ProbeIndex, uint64_t ProbeInfo, std::vector< uint32_t > &RegisterValues, uint32_t TransValueLowRegNr, uint32_t TransValueHighRegNr, uint32_t TransValuePC)
 Create a.
 
void Software::Probing::CreateMemoryProbe ()
 
void Software::Probing::CreateMemShadowProbe (std::vector< Software::ProbesStruct > &StandardProbes, std::vector< uint8_t > &MemoryShadowRegisterProbesIncluded, uint64_t ProbeInfo, uint32_t &ProbeIndex, uint32_t memory_shadow_register, uint32_t next_shadow_register_value, uint32_t TransitionCycle)
 Create a Mem Shadow Probe probe.
 
void Software::Probing::CreateSeperateLoadStoreMemShadowProbe (std::vector< Software::ProbesStruct > &StandardProbes, std::vector< uint8_t > &MemoryShadowRegisterProbesIncluded, uint32_t RegNr, uint32_t InstrNr, uint32_t &ProbeIndex, uint32_t load_store_memory_shadow_register, uint32_t next_load_store_shadow_register_value, uint32_t TransitionCycle, uint32_t ExtensionSize, uint32_t LoadStoreFlag)
 Create a Seperate Load Store Mem Shadow Probe probe.
 
void Software::Probing::CreateHorizontalMemShadowProbe (std::vector< Software::ProbesStruct > &StandardProbes, uint32_t InstrNr, uint32_t &ProbeIndex, uint8_t RegNr, uint32_t memory_shadow_register, uint32_t next_shadow_register_value, uint32_t TransitionCycle, uint32_t ExtensionSize)
 Create a Horizontal Mem Shadow Probe probe.
 
void Software::Probing::CreatePipelineForwardingProbe (std::vector< Software::ProbesStruct > &StandardProbes, std::vector< uint8_t > &PipelineForwardingProbes, uint8_t BitIdx, uint32_t &ProbeIndex, uint64_t ProbeInfo, uint32_t NrOfPipelineStages, std::vector<::mulator::CPU_State > &pipeline_cpu_states)
 Create a Pipeline Forwarding Probe probe.
 
void Software::Probing::ExtractAllProbeInfo (uint8_t &Register, uint8_t &Id, uint8_t &PartnerRegister, uint32_t &Cycle, uint8_t &Bit, uint16_t &ExtensionSize, uint8_t &Dependency, Software::ProbesStruct &ProbeFromProbingSet)
 extract all informations from probe info
 
void Software::Probing::ExtractBitProbeInfo (uint8_t &Bit, Software::ProbesStruct &ProbeFromProbingSet)
 extract bit index from probe info
 
void Software::Probing::ExtractCycleProbeInfo (uint32_t &Cycle, Software::ProbesStruct &ProbeFromProbingSet)
 extract cycle from probe info
 
void Software::Probing::ExtractIdProbeInfo (uint8_t &Id, Software::ProbesStruct &ProbeFromProbingSet)
 extract id from probe info
 
void Software::Probing::ExtractRegisterProbeInfo (uint8_t &Register, Software::ProbesStruct &ProbeFromProbingSet)
 extract register from probe info
 
void Software::Probing::ExtractDependencyProbeInfo (uint8_t &Dependency, Software::ProbesStruct &ProbeFromProbingSet)
 Extract the dependency from probe info.
 
void Software::Probing::ExtractExtensionSizeProbeInfo (uint16_t &ExtensionSize, Software::ProbesStruct &ProbeFromProbingSet)
 Extract the extension size from probe info.
 
void Software::Probing::FillHigherOrderRedundantCases (std::vector< std::vector< uint32_t > > &)
 
void Software::Probing::RedundancyNormalProbe (std::vector< std::vector< uint32_t > > &)
 
void Software::Probing::RedundancyHorizontalProbe (std::vector< std::vector< uint32_t > > &)
 
void Software::Probing::RedundancyVerticalProbe (std::vector< std::vector< uint32_t > > &)
 
void Software::Probing::RedundancyFullHorizontalProbe (std::vector< std::vector< uint32_t > > &)
 
void Software::Probing::RedundancyFullVerticalProbe (std::vector< std::vector< uint32_t > > &)
 
void Software::Probing::ProbeInfoToStandardProbeMapping (std::vector< std::vector< uint32_t > > &ProbeMapping, Software::HelperStruct &Helper, Software::SettingsStruct &Setting)
 
void Software::Probing::Univariate_AddCombinationToProbingSet (Software::ProbingSetStruct &ProbingSet, std::vector< Software::ProbesStruct > &Combination, std::vector< std::tuple< uint32_t, uint32_t > > &OrderOverTwoCombination, std::vector< std::vector< uint32_t > > &ProbeMapping, std::vector< std::vector< uint32_t > > &ResolvedProbes, uint32_t TestOrder)
 
void Software::Probing::Multivariate_AddCombinationToProbingSet (Software::ProbingSetStruct &ProbingSet, std::vector< Software::ProbesStruct > &Combination, std::vector< std::tuple< uint32_t, uint32_t > > &OrderOverTwoCombination, std::vector< std::vector< uint32_t > > &ProbeMapping, std::vector< std::vector< uint32_t > > &ResolvedProbes, uint32_t TestOrder)
 

Macro Definition Documentation

◆ BIT_MASK

#define BIT_MASK   0x1f00

Definition at line 18 of file Probing.hpp.

◆ BIT_OFFSET

#define BIT_OFFSET   8

Definition at line 17 of file Probing.hpp.

◆ CYCLE_OFFSET

#define CYCLE_OFFSET   32

Definition at line 19 of file Probing.hpp.

◆ DEPENDENCY_MASK

#define DEPENDENCY_MASK   0x78000000

Definition at line 22 of file Probing.hpp.

◆ DEPENDENCY_OFFSET

#define DEPENDENCY_OFFSET   27

Definition at line 21 of file Probing.hpp.

◆ EXTENSION_MASK

#define EXTENSION_MASK   0xff

Definition at line 20 of file Probing.hpp.

◆ ID_MASK

#define ID_MASK   0x7800000

Definition at line 12 of file Probing.hpp.

◆ ID_OFFSET

#define ID_OFFSET   23

Definition at line 11 of file Probing.hpp.

◆ PROBING_HPP

#define PROBING_HPP

Definition at line 3 of file Probing.hpp.

◆ REG1_MASK

#define REG1_MASK   0x7c0000

Definition at line 14 of file Probing.hpp.

◆ REG1_OFFSET

#define REG1_OFFSET   18

Definition at line 13 of file Probing.hpp.

◆ REG2_MASK

#define REG2_MASK   0x3e000

Definition at line 16 of file Probing.hpp.

◆ REG2_OFFSET

#define REG2_OFFSET   13

Definition at line 15 of file Probing.hpp.