The parameter passed into inf_generic() has no space at the end of the string, whereas in the interface, the strings that you are comparing have spaces at the end. This results in a mis-match, although this may be a typo.
Your code is creating generate blocks, which add a layer of hierarchy. You need to account for this hierarchy in your interface references.
As I said above, using an ‘if’ statement implicitly creates a generate block.
To reference the interface, you will need to use:
inf_g.genblk1.f_intf.a
Notice the ‘genblk1’ in the hierarchy path. Since you don’t name the generate block, the hierarchy name will vary depending on the simulator. You should use a named generate statement.