thanks for your answering TrickyDicky.
I compiled my counter.VHDL code by Quartus Altera . then I exported it to counter.VHDL Testbench, (counter.vht).then I started MATLAB and change the directory into the counter.VHDL testbench directory and I entered "vsim('socketsimulink', 4449)" command then Modelsim Altera 6.4 started Automatically with that directory. I compiled counter.vht successfully in modelsim . then I placed Cosimulation HDL in simulink model and change the connection in socket 4449 . but when I enter "/counter" in Auto fill in Port tab this Error is appeared: handshaking with the server failed- server was NOT an "HDL link " server , change the port.
How to fix this error ?
thanks in advanced.