Sindhu_Prasana_Nfa Documentation

This page contains the Sindhu_Prasana_Nfa Package documentation.

The sindhu_prasana_nfa Module

class netbench.pattern_match.algorithms.sindhu_prasana_nfa.sindhu_prasana_nfa.sindhu_prasana_nfa(stride=1)

Bases: netbench.pattern_match.nfa_reductions.nfa_reductions

Implementation of NFA in FPGA acording: Reetinder Sidhu and Viktor K. Prasana: Fast Regular Expression Matching using FPGAs, In Proceedings of the 9. Annual IEEE Symposium on Field-Programmable Custom Computing Machines (FCCM‘01), 2001.

Generated VHDL code depends on those modules: value_decoder.vhd, state.vhd and final_bitmap.vhd. Those modules are located in directory templates/vhdl.

Supported symbols for this algorithm are sym_char and sym_kchar if stride parameter is bigger than 1. When strided automaton is used, char classes are used as char class removal for strided nfa generate very huge automata.

Experimantal extension for strided symbols added.

Parameter:stride (int) – Number of characters accepted in one clock cycle. Defaults to 1 char per CLK.
compute()
Compute Sindhu_Prasana automata mapping into FPGA.
get_HDL()

Return HDL description of NFA unit implemented by Sindhu and Prasana’s approach.

Returns:HDL description of NFA unit implemented by Sindhu and Prasana’s approach.
Return type:string
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)

The test_sindhu_prasana_nfa Module

netbench.pattern_match.algorithms.sindhu_prasana_nfa.test_sindhu_prasana_nfa.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.sindhu_prasana_nfa.test_sindhu_prasana_nfa.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.sindhu_prasana_nfa.test_sindhu_prasana_nfa.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.sindhu_prasana_nfa.test_sindhu_prasana_nfa.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.sindhu_prasana_nfa.test_sindhu_prasana_nfa.test_sindhu_prasana_nfa(methodName='runTest')

Bases: unittest.TestCase

A base test class for Sindhu Prasana NFA.

test_std()
Tests the algorithm with standard settings.
test_strided()
Tests the algorithm with stride = 2.

Table Of Contents

Previous topic

J_Hybrid_Fa Documentation

Next topic

Sourdis_Bispo_Nfa Documentation

This Page