How to add some simple blackboxes to the topdesign?

I wanted to add some simple logic like three-state signal conversion at the top of the design, referring to the SDIO in the project, but it didn’t seem to work (sdio.v does not used in the verilog code design which generated by the chisel). Is there any chisel example to do this ?