Dcam Documentation

This page contains the Dcam Package documentation.

The test_dcam Module

netbench.pattern_match.algorithms.experimental.dcam.test_dcam.create_simulation(alg)

Creates simulation files from templates for object specified by alg parameter.

Parameter:alg (b_ptrn_match) – Object representing pattern matching algorithm.
netbench.pattern_match.algorithms.experimental.dcam.test_dcam.load_file(name)

Open file specified by name and split content acording to “%$%”.

Parameter:name (string) – Name of the file.
Returns:Loaded and splited content of the file.
Return type:list(string)
netbench.pattern_match.algorithms.experimental.dcam.test_dcam.run_simulation(test)

Runs the simulation and compare the results.

Parameter:test – Object representing the test.
Returns:True when simulation is OK, False otherwise.
Return type:boolean
netbench.pattern_match.algorithms.experimental.dcam.test_dcam.save_file(name, content)

Save the content stored in parameter content into file named by parameter name.

Parameters:
  • name (string) – Name of the file.
  • content (string) – Content to write.
class netbench.pattern_match.algorithms.experimental.dcam.test_dcam.test_dcam(methodName='runTest')

Bases: unittest.TestCase

A base test class for DCAM.

test_dcam_vhdl()
Tests the algorithm when character classes are used.

The dcam Module

class netbench.pattern_match.algorithms.experimental.dcam.dcam.dcam

Bases: netbench.pattern_match.b_ptrn_match.b_ptrn_match

Implements DCAM (Pre-decoded CAM) as described in Ioannis Sourdis and Dionisios Pnevmatikatos: Pre-decoded CAMs for Efficient and High-Speed NIDS Pattern Matching.

Note: Partitioning and multiple char acception is currently not supported

compute()
Compute DCAM mapping into FPGA.
get_HDL()

Returns VHDL representation of DCAM.

Returns:VHDL description of DCAM unit.
Return type:string
load_from_file(file_name)

Loads strings from specified file.

Parameter:file_name (string) – Name of specified file. One pattern on each line.
load_from_list(slist)

Loads strings from specified list of strings.

Parameter:slist (list(string)) – The list of string patterns. One pattern in one list element.
load_from_string(string)

Loads strings from specified string which contains the strings.

Parameter:string (string) – String with string patterns. One pattern on each line.
report_logic()

Reports amount of logic consumed by the algorithm.

Returns:Amount of logic consumed by the algorithm. (LUTs, FlipFlops, BRAMs)
Return type:tuple(int, int, int)

Table Of Contents

Previous topic

Extend_Fa Documentation

Next topic

History_Counting_Fa Documentation

This Page