Forum Discussion

Matcha's avatar
Matcha
Icon for New Contributor rankNew Contributor
5 years ago
Solved

Efficient Way to store and compare MAC addresses

Hello,

I am quite new to using higher level FPGA elements since in college we only used small scale designs with at most 16-bit wide busses and predefined data paths so forgive me if this question is noobish.

I have been given a list of MAC addresses that I need to store and then compare with incoming ethernet frames in a whitelist fashion. I am using the Triple Speed Ethernet IP.

My initial idea was to use a CAM but I have come to understand that modern FPGAs don't have them. I am now thinking to store the addresses in BRAM but now comes the question of how to compare them. Is it possible to have a 48-bit wide comparator or even a 96-bit wide comparator to compare src and dest MACs in a single shot?

Thank you in advance for the help

  • Yes, if you want to make comparison. You can make use of the comparator, all the IP is in the IP catalog.


    What I would suggest is you use modelsim to make sure the behavior is the one that you want.


3 Replies

  • KennyT_altera's avatar
    KennyT_altera
    Icon for Super Contributor rankSuper Contributor

    Yes, if you want to make comparison. You can make use of the comparator, all the IP is in the IP catalog.


    What I would suggest is you use modelsim to make sure the behavior is the one that you want.


    • Matcha's avatar
      Matcha
      Icon for New Contributor rankNew Contributor

      Hi yes, this helped me out. I able to make a comparator with the bus widths I needed through the IP generator.

  • KennyT_altera's avatar
    KennyT_altera
    Icon for Super Contributor rankSuper Contributor

    We do not receive any response from you to the previous reply that we have provided. Please post a response in the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you with your follow-up questions.