In reply to watashi:
I had a closer look to your code and have a question. What is the need of your localparam TYPE_NAME?