Add tests to ensure directive bodies are not too short
Use correct width for instantiated memory
Use clearer comments in generated code for memory read/write/non-existence