SCD TCAM Library Fred Kuhns fredkarl wustl edu
SCD: TCAM Library Fred Kuhns fredk@arl. wustl. edu Applied Research Laboratory Washington University in St. Louis fredk@arl. wustl. edu Washington WASHINGTON UNIVERSITY IN ST LOUIS
Assumptions, Constants • TCAM located on SRAM 0 (SRAM, channel ID 0) – • Base address 0 x 80000000; Select 0 and burst size 1. Each NPU (A/B) has own LA-1 interface – SPP version 1 and 2 do not use the second LA-1 interface – – – NPUA must perform initial configuration Both NPUA/B can use LA-1 interface for lookups All TCAM control implemented on XScale A • • • – 256 K x 72 -bit core entries Database must start on a segment boundary. Max segments: 32 ZBT Associated SRAM – – – • Max: 576 -bits; Min: 32 -bits; Allowed sizes: n*32, n in (1, 18); 36; 74 and 144. Actual Core sizes: 36, 72, 144, 288 and 576 bits Segment size: 8 K x 72 -bit – – – • Maximum of 16 databases; Must start on segment boundary User specified DB entry widths: – • its not clear that we can use the IDT libraries to control from both NPUA and NPUB. All databases are IDT type exact match. – – • set Is. Port 1 Used to 0 (i. e. false) 512 K x 36 bit ZBT SRAM (18 Mb) Allocated as 0, 32, 64 or 128 -bit result data Index and size are number of 32 -bit words Command context – – Available: 128 (0, . . . , 127) Control uses context 120 through 127 Fred Kuhns - 9/9/2020 Washington WASHINGTON UNIVERSITY IN ST LOUIS 2
Search Machine Class • Class Search. Machine {. . . } – May use callbacks with interrupt handlers for ARP aging. – Constructor accepts a set of key value pairs specify the configurable parameters. typedef multimap<string, val. Table> conf. Table; – Internal state: • next database id, starts at 0. • segment allocation state (for the 32 available segments): Just need current address of available block. • associated memory allocation state: Just need current address of available block. • current set of database objects (stl set object). – Operations: The Database object is of type Handle<T, P> with the Ref. Cnt. Policy (reference counted smart pointer). Or can use pointers by then the Search. Machine class “owns” the DB object and is the only one allowed to destroy it. typedef handle<Database, Ref. Cnt. Policy> DB; DB create_database(key_bits, res_bits, max_cnt); void destroy_database(DB); get_dbs() // returns an iterable object, say an stl set. Fred Kuhns - 9/9/2020 Washington WASHINGTON UNIVERSITY IN ST LOUIS 3
Configuring a Data. Base • class Data. Base {. . . } – The user is expected to keep track of entry indices. – State: id_; // returns ID assigned by Search. Machine class handle_; // assigned by IDT software when DB is created key_width(); // in bits core_width(); // in bits result_width(); // in bits entry_count(); // max number of entries core_start_addr_; assoc_data_addr_; – Operations: fltr {key[N]; mask[N]; result[M]} write_fltr(index, fltr); update_result(index, result); fltr get_fltr(key); fltr get_fltr(index) result lookup_fltr(key) rem_fltr(fid); rem_fltr(key) Fred Kuhns - 9/9/2020 Washington WASHINGTON UNIVERSITY IN ST LOUIS 4
Configuration File [Search. Machine] use. LAPort 1 = 0 [database] name = name_db 1 id = num_db 1 num. Entries = X key. Width = W # bits result. Width = Y # bits [database]. . . Fred Kuhns - 9/9/2020 Washington WASHINGTON UNIVERSITY IN ST LOUIS 5
Substrate Configuration tables on NPE Search machine Entries keys masks results . . . NPUA. . . 0 1 2 TCAM . . . NPUB. . . NA NA+1 NA+2 . . . NA-1 N-1 Fred Kuhns - 9/9/2020 Washington WASHINGTON UNIVERSITY IN ST LOUIS 6
- Slides: 6